module.js:338
throw err;
^
Error: Cannot find module './nvm-help'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/usr/local/lib/node_modules/nvm/bin/nvm:24:3)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
Did you npm install nvm? See #304 - that's the wrong one. Use the install instructions in the readme.
i'm sorry~~
:-) no problem, it's a common mistake
installing nvm with brew would easily meet this error
@klamtlne nvm is not supported on homebrew, and the homebrew installation formula will even inform you of that fact. nvm should not be installed with brew.
I'm a noob and I have this error, but this thread is confusing me. The nvm package at npmjs.com seems to be the one I want. I installed it using sudo npm install -g nvm like the package page says. I'm on Ubuntu.
I don't see a different installation command in issue #304.
Can anyone help me to understand what I need to do?
I don't know if this is relevant or not, but I'm on Ubuntu and I installed NodeJS using the package manager.
Thank you.
@Ghodmode it's not. you want to only install nvm from the curl command in this repo's README.
(Separately, you don't want to be installing node with distro package managers)
Thanks @ljharb. I took a step back and sort of started over. I found a PPA with a newer version of NodeJS (which solved an unrelated (warning) problem) and saw the instructions in the GitHub repo. Now everything's working beautifully :)
I've downloaded from the Curl link and I'm still getting this error...so I did the npm uninstall -g nvm, then ran the curl, closed out of my terminal, and now it's saying "nvm command not found."
@PeterKaminski09 what shell and OS are you using? if you . "$NVM_DIR/nvm.sh", does nvm debug work?
I was able to fix it by running the source command and manually adding the export and path to my bash profile. Not sure why it didn't add it with the script.
I was using iTerm2 and El Capitan
Given this is the top result for 'Error: Cannot find module ./nvm-help, and there hasn't been any helpful responses besides reinstalling. I would suggest to anyone out there that doesn't want to reinstall to just comment out the require('./nvm-help'); line in your nvm file. Mines is located in /usr/local/lib/node_modules/nvm/bin/nvm. Hope it helps.
@gtdeng the helpful response is "don't use the nvm that's on npm; it's broken and unsupported" - install nvm using the install command in the readme.
Most helpful comment
Did you
npm install nvm? See #304 - that's the wrong one. Use the install instructions in the readme.