npm installs all modules in /usr/local/lib/node_modules/

前端 未结 3 1981
Happy的楠姐
Happy的楠姐 2020-12-31 13:33

I have node.js 0.8.14 installed on Ubuntu 12.10. I created a directory in my home directory with a sub directory node_modules. I want to install some local node

3条回答
  •  时光说笑
    2020-12-31 14:04

    That is odd.

    • FYI you don't need to create the node_modules directory, npm will do that for you
    • npm normally just installs to the current directory. Even if the package you are installing is configured to prefer global installation, npm will install it locally unless you explicitly pass the -g parameter.
    • can you run the following shell commands and confirm npm is really the real npm?
      • which npm
      • alias | grep npm

提交回复
热议问题