npm is installing dependencies in a weird recursive way

前端 未结 2 1248
攒了一身酷
攒了一身酷 2021-01-02 14:35

I used npm install --dev to install the dependencies listed in a package.json file and it seems that rather than installing all the packages in a f

2条回答
  •  一个人的身影
    2021-01-02 15:12

    Don't worry, that's actually the way Npm was designed. You may even see the same module installed many times (though typically with different versions).

    The idea is that each module installed under node_modules is a somewhat self-contained installation of that module with its dependencies and the necessary versions -- it doesn't depend on modules installed globally.

    If you are worried about inefficiency of modules being installed multiple times, the experimental npm dedupe.

提交回复
热议问题