Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module './nvm-help' #750

Closed
i5ting opened this issue May 7, 2015 · 14 comments
Closed

Error: Cannot find module './nvm-help' #750

i5ting opened this issue May 7, 2015 · 14 comments

Comments

@i5ting
Copy link

i5ting commented May 7, 2015

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)
@ljharb
Copy link
Member

ljharb commented May 7, 2015

Did you npm install nvm? See #304 - that's the wrong one. Use the install instructions in the readme.

@ljharb ljharb closed this as completed May 7, 2015
@i5ting
Copy link
Author

i5ting commented May 7, 2015

i'm sorry~~

@ljharb
Copy link
Member

ljharb commented May 7, 2015

:-) no problem, it's a common mistake

@jiananshi
Copy link

installing nvm with brew would easily meet this error

@ljharb
Copy link
Member

ljharb commented Dec 10, 2015

@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.

@VAggrippino
Copy link

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.

@ljharb
Copy link
Member

ljharb commented Jan 3, 2016

@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)

@VAggrippino
Copy link

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 :)

@PeterKaminski09
Copy link

PeterKaminski09 commented May 21, 2016

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."

@ljharb
Copy link
Member

ljharb commented May 21, 2016

@PeterKaminski09 what shell and OS are you using? if you . "$NVM_DIR/nvm.sh", does nvm debug work?

@PeterKaminski09
Copy link

PeterKaminski09 commented May 21, 2016

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.

@PeterKaminski09
Copy link

PeterKaminski09 commented May 21, 2016

I was using iTerm2 and El Capitan

@gtdeng
Copy link

gtdeng commented Feb 28, 2018

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.

@ljharb
Copy link
Member

ljharb commented Feb 28, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants