Sample Header Ad - 728x90

nvm command not available in bash script

78 votes
6 answers
51841 views
I am trying to build a script in in which nvm and eventually node will get installed. I have installed nvm with cURL. I see the modifications in the .profile or .bashrc file (both work) and when typing the nvm at the bash prompt, it shows the options available etc. So nvm works. Manually I can install node, but as soon as I put the nvm command in a shell script: nano test.sh #!/bin/bash nvm and run it with: chmod 755 test.sh ./test.sh I get: ./test.sh: line 2: nvm: command not found If it can't find nvm, I don't even have to think of nvm ls-remote or nvm install ... I got Ubuntu 14.04 installed and Bash is my shell.
Asked by okidoki (783 rep)
Feb 12, 2015, 05:12 PM
Last activity: Aug 14, 2024, 06:33 AM