【发布时间】:2018-12-04 00:19:13
【问题描述】:
我在运行 npm uninstall 时遇到以下错误...谁能帮忙解决...我已经做了几乎所有的事情来解决这个问题...
npm WARN react-star-rating-component@1.4.1 requires a peer of react@^16.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package detect-port is included as both a dev and production dependency.
audited 17423 packages in 20.551s
found 40 vulnerabilities (7 low, 31 moderate, 1 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
当我运行 npm audit 时,它给了我以下 = 错误
npm ERR! code ELOCKVERIFY
npm ERR! Errors were found in your package-lock.json, run npm install to fix them.
npm ERR! Invalid: lock file's detect-port@1.2.3 does not satisfy detect-port@1.0.1
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-06-25T12_13_53_712Z-debug.log
【问题讨论】:
-
执行
npm audit将显示详细信息(如输出中所述)并提供更新相应库的命令。 -
@Sirko 感谢您的回复...请检查更新的问题
-
错误说明了问题(至少一个):您安装的
detect-port版本与package.json中要求的版本不匹配。我会开始解决这个问题。 -
@Sirko 谢谢,但是如何解决这个错误。你是它的主要开发者吗...
-
看看你的 JSON 包。在
dependencies下将有一个detect-port条目。版本号的语法解释为here。确保版本1.2.3与那里请求的版本兼容。
标签: reactjs npm npm-install node-modules npm-start