Where should my npm modules be installed on Mac OS X?

后端 未结 4 1150
长情又很酷
长情又很酷 2020-12-12 23:25

I was attempting to upgrade phonegap via npm when I started running into trouble. Long story short, there are two node_modules directo

4条回答
  •  执念已碎
    2020-12-12 23:45

    /usr/local/lib/node_modules is the correct directory for globally installed node modules.

    /usr/local/share/npm/lib/node_modules makes no sense to me. One issue here is that you're confused because there are two directories called node_modules:

    /usr/local/lib/node_modules
    /usr/local/lib/node_modules/npm/node_modules

    The latter seems to be node modules that came with Node, e.g., lodash, when the former is Node modules that I installed using npm.

提交回复
热议问题