NPM installs dependencies in a wrong place

前端 未结 2 1323
你的背包
你的背包 2020-12-02 02:20

I just run a simple npm install morgan in a folder and for some reason it adds all the sub dependencies to the parent folder. See image attached

2条回答
  •  孤城傲影
    2020-12-02 03:08

    Npm has changed the way they organize dependencies. So instead of 2 separate modules requiring the same dependency and installing them in their own node_modules folder. The dependency is only installed once at the same folder level the node module is installed at.

提交回复
热议问题