[英]npm install whatever --save is not saving into my package.json?
I have been installing packages and just noticed that not many of my packages are in my package.json? 我一直在安装软件包,只是注意到我的package.json中没有很多软件包? I always do --save
when I install. 我总是在安装时做--save
。 In fact I just installed about 10 dependencies and none saved. 实际上,我只安装了大约10个依赖项,却没有保存。
Has anyone run into this before? 有人遇到过吗?
Try to do --save-dev
when installing your npm package. 安装npm软件包时,尝试执行--save-dev
。 It will save all the devDependencies that are used in development. 它将保存开发中使用的所有devDependencies。 --save
just save the dependencies. --save
只保存依赖项。 May be there is no dependencies that are dependent on your project. 可能没有依赖项依赖于您的项目。
Have you run npm init
before? 您之前运行过npm init
吗?
Try to run npm init
then npm install xxxx --save
尝试运行npm init
然后npm install xxxx --save
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.