npm 删除每次安装的依赖项 [英] npm removing dependencies on each install
本文介绍了npm 删除每次安装的依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每次我安装一个包时,node 都会删除一个依赖项.我目前使用的是 NPM 版本 6.13.4.我看到这个问题是在 2017 年在 github 上注意到的,但似乎没有得到解决.我可以安装的软件包数量有限制吗?这是我的 package.json:
Every time I install a package, node removes a dependency. I am currently on NPM version 6.13.4. I saw that this issue was noted in 2017 on github and it didn't appear to be resolved. Is there a limit to the number of packages I can install? Here is my package.json:
{
"name": "test",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www",
"devstart": "nodemon ./bin/www -e js, pug",
"serverstart": "DEBUG=test:* npm run devstart"
},
"dependencies": {
"async": "^3.2.0",
"aws-sdk": "^2.762.0",
"bcrypt": "^4.0.1",
"body-parser": "^1.19.0",
"connect-redis": "^4.0.4",
"cookie-parser": "^1.4.5",
"debug": "~2.6.9",
"dotenv": "^8.2.0",
"express": "~4.16.1",
"express-session": "^1.17.0",
"express-socket.io-session": "^1.3.5",
"express-validator": "^6.4.0",
"fs": "0.0.1-security",
"geojson": "^0.5.0",
"http": "0.0.1-security",
"http-errors": "~1.6.3",
"moment": "^2.24.0",
"mongoose": "^5.9.7",
"morgan": "~1.9.1",
"multer": "^1.4.2",
"multer-s3": "^2.9.0",
"node-geocoder": "^3.27.0",
"nodemailer": "^6.4.11",
"pug": "2.0.0-beta11",
"redis": "^3.0.2",
"socket.io": "^2.3.0",
"striptags": "^3.1.1"
},
"devDependencies": {
"nodemon": "^2.0.2",
"stripe": "^8.102.0"
}
}
推荐答案
NPM 多年来一直存在这个问题.纱线似乎是一个不错的选择.
NPM has had this issue for years. Yarn seems to be a good alternative.
这篇关于npm 删除每次安装的依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文