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

seems n changes prefix for npm #328

Closed
amishurov opened this issue Dec 3, 2015 · 2 comments
Closed

seems n changes prefix for npm #328

amishurov opened this issue Dec 3, 2015 · 2 comments

Comments

@amishurov
Copy link

How to reproduce on Ubuntu 12.04
sudo npm -g install n

/usr/bin/n -> /usr/lib/node_modules/n/bin/n
[email protected] /usr/lib/node_modules/n

sudo npm prefix -g

/usr

sudo n 4.1.0

install : node-v4.1.0
mkdir : /usr/local/n/versions/node/4.1.0
fetch : https://nodejs.org/dist/v4.1.0/node-v4.1.0-linux-x64.tar.gz
installed : v4.1.0

sudo npm prefix -g

/usr/local
@shadowspawn
Copy link
Collaborator

I was reading up on this recently, so adding an answer to this old old question.

The npm docs say that by default:

The prefix config defaults to the location where node is installed.

So in your case when you use n to install a copy of node to the default prefix of /usr/local/ it also implicitly changes the prefix for npm to /usr/local/ when that copy of node is running. (i.e. the new node executable is at /usr/local/bin/node)

https://docs.npmjs.com/files/folders.html#prefix-configuration

@shadowspawn
Copy link
Collaborator

This issue has not had any activity in over six months. It isn't likely to get acted on due to this report.

Feel free to open a new issue if it comes up again, with new information and renewed interest.

Thank you for your contributions.

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

2 participants