How do I prevent npm install from removing packages?

后端 未结 5 1293
无人及你
无人及你 2021-01-11 15:39

I\'m trying to set up a development environment with several packages, and as a result I need to manually install some dependencies. More specifically, I have some local ch

5条回答
  •  忘掉有多难
    2021-01-11 16:02

    Are you saving the dependencies to package.json? To Save : npm install --save {package_name}. This will save the package to package.json and install using npm install.

    You can't particularly control the dependencies(fully). The dependencies which you have installed might be using dependencies themselves.So when you remove a package, npm deletes all the package's dependencies and the package.

提交回复
热议问题