Where does npm install packages?

后端 未结 23 1661
梦毁少年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:29

    If a module was installed with the global (-g) flag, you can get the parent location by running:

    npm get prefix
    

    or

    npm ls -g --depth=0
    

    which will print the location along with the list of installed modules.

提交回复
热议问题