最新节点v16.15.1和NPM 8.11.0面对问题

发布于 2025-02-07 14:45:36 字数 2320 浏览 0 评论 0原文

将节点更新为最新的16.15.1

并尝试了NPM安装或NPM CI获取以下错误。

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @vue/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/@vue/cli-plugin-eslint/node_modules/eslint
npm ERR!   peer eslint@">=1.6.0 <7.0.0" from [email protected]
npm ERR!   node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader
npm ERR!     eslint-loader@"^2.2.1" from @vue/[email protected]
npm ERR!     node_modules/@vue/cli-plugin-eslint
npm ERR!       dev @vue/cli-plugin-eslint@"^4.5.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from @vue/[email protected]
npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR!   dev @vue/cli-plugin-eslint@"^4.5.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/eslint
npm ERR!   peer eslint@">= 1.6.0 < 7.0.0" from @vue/[email protected]
npm ERR!   node_modules/@vue/cli-plugin-eslint
npm ERR!     dev @vue/cli-plugin-eslint@"^4.5.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

解决方法是使用NPM使用-Legacy-Peer-Deps

,或者我们有更好的解决方案,而不是接受不正确的(并且可能破裂的)依赖性分辨率。

After updating the node to the latest 16.15.1

And tried npm install or npm ci getting the below error.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @vue/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/@vue/cli-plugin-eslint/node_modules/eslint
npm ERR!   peer eslint@">=1.6.0 <7.0.0" from [email protected]
npm ERR!   node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader
npm ERR!     eslint-loader@"^2.2.1" from @vue/[email protected]
npm ERR!     node_modules/@vue/cli-plugin-eslint
npm ERR!       dev @vue/cli-plugin-eslint@"^4.5.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from @vue/[email protected]
npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR!   dev @vue/cli-plugin-eslint@"^4.5.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/eslint
npm ERR!   peer eslint@">= 1.6.0 < 7.0.0" from @vue/[email protected]
npm ERR!   node_modules/@vue/cli-plugin-eslint
npm ERR!     dev @vue/cli-plugin-eslint@"^4.5.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

The workaround is to use --legacy-peer-deps with npm

Or do we have any better solution instead of accepting an incorrect (and potentially broken) dependency resolution.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文