I am working on an express app and trying to deploy it on ec2 with Jenkins. I used the terminal to install nvm and it's working fine.
In Jenkins, I used Publish Over SSH Plugin to upload the build to ec2 with the same user but it fails on npm install command.
I checked .bashrc and verified the nvm installation.
When I run printenv command from the shell it shows nvm in PATH
PATH=/home/ubuntu/.nvm/versions/node/v12.13.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
But when I run it from Jenkins job it is not there
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games _=/usr/bin/
