How to use nvm and deployer on the server? #2742
-
I like to use nvm for version control of npm and node. [prod] error in npm.php on line 25:
[prod] run command -v 'npm' || which 'npm' || type -p 'npm'
[prod] exit code 1 (General error) Side note: when I install nodejs and npm outside of nvm it seems to work fine. My export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
What’s the question? Looks like PATH problem. Note what Deployer uses bash by default. Use absolutely path to you binary. |
Beta Was this translation helpful? Give feedback.
-
Hmm oke, this is what I did to fix it. Adding this to source $HOME/.nvm/nvm.sh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |
Beta Was this translation helpful? Give feedback.
Hmm oke, this is what I did to fix it.
Adding this to
.zshrc
and.bashrc
: