我很好奇我找不到这个简单问题的答案。我也很纳闷这npm update
不能解决这个问题。
我无法在此处发布完整的依赖关系树,但无论如何,请允许我描述我的问题:
minimist已过时(版本1.2.0),并且在此版本中存在安全漏洞。这些软件包要求最低要求将相关性定义为^ 1.2.0-因此它与1.2.2兼容。
常见的解决办法是把它放到package.json
内devDependencies
或dependencies
用^1.2.2
。我不想把它放进去package.json
。我觉得npm update
还应该更新间接依赖项。
我想念什么吗?
在这里您可以看到我的package-lock.json:https : //github.com/tflori/riki-community/blob/master/package-lock.json
和的输出npm ls minimist
:
riki-community@ /home/iras/work/projects/riki/community
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected] deduped
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ @jest/[email protected]
│ ├─┬ @jest/[email protected]
│ │ └─┬ @babel/[email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ ├─┬ @cnakazawa/[email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected] deduped
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└─┬ UNMET OPTIONAL DEPENDENCY [email protected]
└─┬ UNMET OPTIONAL DEPENDENCY [email protected]
├─┬ UNMET OPTIONAL DEPENDENCY [email protected]
│ └── UNMET OPTIONAL DEPENDENCY [email protected]
└─┬ UNMET OPTIONAL DEPENDENCY [email protected]
└── UNMET OPTIONAL DEPENDENCY [email protected]
在其他人做之前:当然有解决方法...
打开package-lock.json
找到所有出现"minimist": {
的对象并删除该对象。
例:
更改此:
"dependencies": {
"minimist": {
"version": "1.2.0",
"bundled": true,
"dev": true,
"optional": true
}
}
对此:
"dependencies": {
}
并npm install
再次运行。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句