Where does npm install packages?

后端 未结 23 1344
梦毁少年i
梦毁少年i 2020-11-22 06:03

Can someone tell me where can I find the Node.js modules, which I installed using npm?

23条回答
  •  孤独总比滥情好
    2020-11-22 06:38

    In earlier versions of NPM modules were always placed in /usr/local/lib/node or wherever you specified the npm root within the .npmrc file. However, in NPM 1.0+ modules are installed in two places. You can have modules installed local to your application in /.node_modules or you can have them installed globally which will use the above.

    More information can be found at https://github.com/isaacs/npm/blob/master/doc/install.md

提交回复
热议问题