开发者

npm not defaulting local installs to ./node_modules

When I try to do a local install (eg. npm install socket.io), it's putting the module in the ~/src/node_modules/ folder. npm root reports this folder as well. I must have screwed up npm's settings during some bleary eyed late night session, but I can't figure out how to get it set back to ./node_modules as the default. Anyone know what I screwed up, and how to set it back to the default?

Update

I have tried npm config set root ./node_modules but npm root still reports ~/src/node_modules as the root. I also checked .bash_p开发者_JAVA技巧rofile and no node related settings are being made in it.


A quick npm uninstall npm -g and then another install from the npm website should get your defaults back.

Normally reinstalling is a pain but with your package.json files you can get everything set back up with a quick npm link

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜