npm - npm 删除每次安装的依赖项
问题描述
每次我安装一个包时,节点都会删除一个依赖项。我目前使用的是 NPM 版本 6.13.4。我看到 2017 年在 github 上注意到了这个问题,但似乎没有得到解决。我可以安装的软件包数量是否有限制?这是我的 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 多年来一直存在这个问题。纱线似乎是一个不错的选择。
推荐阅读
- javascript - 输入 type="month" 替换 Firefox
- java - 如何解决 java.lang.Throwable?
- javascript - 如果有一天 Expo 不可用,我的应用程序会发生什么
- matlab - 在多个矩阵中同时选择非 NaN 值
- apache-spark - 将 ORC 文件从 spark 写入 hadoop 时出错
- json - Spring Boot,如何将 JSON 数据发送到实际的 web-api 并获取 JSON 响应
- php - 如何修复用户“user_name”已超过“max_user_connections”资源(当前值:30)?
- php - 检查日期时间php
- excel - 使用锁定的 ID 字段将无序访问记录移动到正确顺序的最佳方法是什么?
- c# - C#一次将字符串行合并为3组