scrblnrd3
scrblnrd3

Reputation: 7416

npm install -g is installing to a local folder

I have been using node and npm for a while, and I just started a larger scale project using it. Recently, however, whenever I run sudo npm install -g, it will install it into a ~/Programming/usr/local/bin instead of /usr/local/bin. Does anyone know why this is happening? How can I reset the installation location

Upvotes: 0

Views: 46

Answers (1)

zfedoran
zfedoran

Reputation: 3046

You can set the location by running the following command.

npm config set prefix /usr/local

Upvotes: 1

Related Questions