Where does npm install packages?

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

    • Echo the config: npm config ls or npm config list

    • Show all the config settings: npm config ls -l or npm config ls --json

    • Print the effective node_modules folder: npm root or npm root -g

    • Print the local prefix: npm prefix or npm prefix -g

      (This is the closest parent directory to contain a package.json file or node_modules directory)


    • npm-config | npm Documentation
    • npm-root | npm Documentation
    • npm-prefix | npm Documentation

提交回复
热议问题