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

cannot run nvm from npm start #890

Closed
devildeveloper opened this issue Nov 2, 2015 · 11 comments
Closed

cannot run nvm from npm start #890

devildeveloper opened this issue Nov 2, 2015 · 11 comments
Labels
non-issue / invalid This isn't relevant to nvm, or turned out to be something unrelated.

Comments

@devildeveloper
Copy link

captura de pantalla 2015-11-01 a las 8 28 05 p m

trying to run "nvm run stable server.js" from npm scripts
captura de pantalla 2015-11-01 a las 8 31 35 p m
i installed nvm from curl, not using npm install nvm

@ljharb
Copy link
Member

ljharb commented Nov 2, 2015

If you're getting that nvm-help error, then you definitely have the npm (wrong) version of nvm. Try npm uninstall -g nvm?

@ljharb ljharb added the needs followup We need some info or action from whoever filed this issue/PR. label Nov 2, 2015
@ghost
Copy link

ghost commented Nov 7, 2015

@ljharb so it's not possible to install nvm via npm?

@ljharb
Copy link
Member

ljharb commented Nov 8, 2015

@dkfiresky npm requires node. what kind of sense does it make to install an X version manager with a tool that requires X? :-)

@ghost
Copy link

ghost commented Nov 8, 2015

@ljharb what is the purpose of publishing this package over npm than? And why I'm able to install it over npm?

@ljharb
Copy link
Member

ljharb commented Nov 8, 2015

@dkfiresky see #304 for background - basically, because anyone can publish anything to npm, someone published a package named "nvm" that isn't this one. They graciously added me as an owner, so at some point in the future, I'll replace it with something more useful, but you'll note if you install it over npm, it gives you a deprecation warning directing you to this repository.

@ljharb ljharb added non-issue / invalid This isn't relevant to nvm, or turned out to be something unrelated. and removed needs followup We need some info or action from whoever filed this issue/PR. labels Nov 8, 2015
@ljharb ljharb closed this as completed Nov 8, 2015
@john3exonets
Copy link

For others that my stumble upon this issue: nvm can be used in the 'start' option in the "scripts" part of your package.json file, if you source the nvm.sh file as part of the command line. So you can do something like this:
"start": "source ~/.nvm/nvm.sh; nvm use stable; node yourapp.js"

And your app should start up just fine without the error described in this issue.

@ikbelkirasan
Copy link

For others that my stumble upon this issue: nvm can be used in the 'start' option in the "scripts" part of your package.json file, if you source the nvm.sh file as part of the command line. So you can do something like this:
"start": "source ~/.nvm/nvm.sh; nvm use stable; node yourapp.js"

And your app should start up just fine without the error described in this issue.

Or if source is not available:

{
  "start": ". ~/.nvm/nvm.sh; nvm use stable; node yourapp.js"
}

@chriswood

This comment has been minimized.

@ljharb

This comment has been minimized.

@chriswood

This comment has been minimized.

@ljharb

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-issue / invalid This isn't relevant to nvm, or turned out to be something unrelated.
Projects
None yet
Development

No branches or pull requests

5 participants