对等依赖"/>
删除的节点模块仍然存在冲突的对等依赖
我正在尝试构建一个 gatsby 项目。在我安装谷歌分析插件之前,我的项目没有任何包冲突。
即使在删除 node_modules、package-lock.json、.cache 后,我仍出现依赖性错误
日志:
pegasus@pegasus:~/Documents/Final_Website/blog$ npm install gatsby-plugin-mdx gatsby-source-filesystem @mdx-js/react
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/gatsby
npm ERR! gatsby@"^4.10.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer gatsby@"^5.0.0-next" from [email protected]
npm ERR! node_modules/gatsby-plugin-google-analytics
npm ERR! gatsby-plugin-google-analytics@"^5.9.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!
npm ERR!
npm ERR! For a full report see:
npm ERR! /home/pegasus/.npm/_logs/2023-05-04T05_04_02_747Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pegasus/.npm/_logs/2023-05-04T05_04_02_747Z-debug-0.log
如何解决?
回答如下:更多推荐
删除的节点模块仍然存在冲突的对等依赖
发布评论