Add NPM usage #169

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

Access NPM within the given node version as follow

nvm npm 0.6.14
Owner

creationix commented May 1, 2013

What's the use case? Why not just switch to that version, and then use npm?

@creationix I am sorry, i am new & confused. Thought that was the way to go till i understood nvm use is required for npm to be on my path. Now i am trying to figure out how to avoid nvm use 0.10 in my .bash_profile so i can have npm in the path.

Owner

creationix commented May 1, 2013

nvm is a tool to manipulate a bash environment. One neat feature is to alias default to your preferred node version. On my machines I have nvm alias default 0.10. Then every time I source nvm in a new shell, the latest 0.10.x node is put in my path (with it's own copy of npm)

Owner

creationix commented May 1, 2013

This alias command is persistent, it's not something you need to put in your .bashrc. Just do it once in any shell that has nvm loaded.

yes! cool! that worked! Thanks @creationix :)

@creationix The use case for this request: managing multiple node apps that require different node versions without the need to switch continuously to use the correct NPM.

@gabrieleds gabrieleds closed this May 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment