# \[Drone Pipeline ssh\] yarn and npm not found

**URL:** <https://drone.discourse.group/t/drone-pipeline-ssh-yarn-and-npm-not-found/11797>\
**Category:** Drone Support\
**Created:** [March 13, 2022, 3:29am UTC](https://drone.discourse.group/t/drone-pipeline-ssh-yarn-and-npm-not-found/11797 "2022-03-13T03:29:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Major](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@Major](https://drone.discourse.group/u/Major)\
**Post date:** [March 13, 2022, 3:29am UTC](https://drone.discourse.group/t/drone-pipeline-ssh-yarn-and-npm-not-found/11797/1 "2022-03-13T03:29:03Z")

</div>

Hi,  
I tried to use drone pipeline. And type is ssh, to build web.  
But an error happend. It shows npm and yarn not found.  
On my server, I use nvm to choose npm version and to compile the frontend code.  
does anyone knows how to use npm and yarn in drone pipeline ssh process ?  
And how to use particular version of npm and yarn ?

```auto
---
kind: pipeline
type: ssh
name: default

workspace:
  base: /home/deployer
  path: solos_web_frontend

clone:
  disable: true

server:
  host: xxx.xxx.xxx.xxx
  user: deployer
  ssh_key:
    from_secret: ssh_key

steps:
- name: frontend
  commands:
    - cd /home/deployer/solos_web_frontend
    - git reset --hard
    - git pull
    - yarn
    - yarn build
    - echo $PASSWORD | sudo -S service nginx restart
  when:
    branch:
      - dev2.0
  environment:
    PASSWORD:
      from_secret: password

```

Thanks in advance.  
Major

---

<div class="post-metadata">

**Author:** ![drone](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/drone/32/6956_2.png) [@drone](https://drone.discourse.group/u/drone)\
**Post date:** [March 13, 2022, 9:03pm UTC](https://drone.discourse.group/t/drone-pipeline-ssh-yarn-and-npm-not-found/11797/2 "2022-03-13T21:03:52Z")

</div>

Here is a link to a relevant thread where a similar question is asked:  
[https://discourse.drone.io/t/solved-local-environment-not-available-in-ssh-pipeline/8637/2](https://discourse.drone.io/t/solved-local-environment-not-available-in-ssh-pipeline/8637/2)

---

<div class="post-metadata">

**Author:** ![Major](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@Major](https://drone.discourse.group/u/Major)\
**Post date:** [March 14, 2022, 11:19am UTC](https://drone.discourse.group/t/drone-pipeline-ssh-yarn-and-npm-not-found/11797/3 "2022-03-14T11:19:15Z")

</div>

Thank you very much for your help.  
I resolved this issues by using docker ssh.

Regards,  
Major
