删除导致冲突的旧版本的ESLINT

发布于 2025-01-30 01:42:14 字数 1350 浏览 0 评论 0原文

当我运行NPM运行手表时,我会得到此消息您要安装'webpack-cli'(是/否):

i类型y y 然后,我遇到了一个错误,表明ESLINT版本的冲突

npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^4.19.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.0.0" from [email protected]
npm ERR! node_modules/eslint-plugin-vue
npm ERR!   dev eslint-plugin-vue@"^5.0.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 ERR!

ps:我不喜欢使用npm install - legacy-peer-dep作为解决方法来忽略对等方格并继续安装,但是我需要确定地删除它

有没有办法完全删除旧版本,以便我不会遇到任何麻烦?

When I run npm run watch I get this message Do you want to install 'webpack-cli' (yes/no):

I type y then I get an error indicating a conflict of eslint versions

npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^4.19.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.0.0" from [email protected]
npm ERR! node_modules/eslint-plugin-vue
npm ERR!   dev eslint-plugin-vue@"^5.0.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 ERR!

PS: I don't prefer to use npm install --legacy-peer-dep as workaround to ignore peer deps and proceed with the installation anyway, yet I need to delete it definitively

is there a way to completly remove the old version so I won't get any troubles ?

enter image description here

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

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

发布评论

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