欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 新车 > vue npm install出现问题

vue npm install出现问题

2025/4/17 5:33:21 来源:https://blog.csdn.net/qq_41739657/article/details/144267469  浏览:    关键词:vue npm install出现问题

报错如下:

ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: web-ifc-viewer@1.0.218
npm ERR! Found: three@0.149.0
npm ERR! node_modules/three
npm ERR!   peer three@">=0.126.1" from camera-controls@1.38.2
npm ERR!   node_modules/camera-controls
npm ERR!     camera-controls@"^1.33.1" from web-ifc-viewer@1.0.218
npm ERR!     node_modules/web-ifc-viewer
npm ERR!       web-ifc-viewer@"^1.0.218" from the root project
npm ERR!   peer three@">= 0.123.0" from three-mesh-bvh@0.5.21
npm ERR!   node_modules/web-ifc-viewer/node_modules/three-mesh-bvh
npm ERR!     three-mesh-bvh@"^0.5.11" from web-ifc-viewer@1.0.218
npm ERR!     node_modules/web-ifc-viewer
npm ERR!       web-ifc-viewer@"^1.0.218" from the root project
npm ERR!     three-mesh-bvh@"0.5.21" from web-ifc-three@0.0.125
npm ERR!     node_modules/web-ifc-viewer/node_modules/web-ifc-three
npm ERR!       web-ifc-three@"^0.0.125" from web-ifc-viewer@1.0.218
npm ERR!       node_modules/web-ifc-viewer
npm ERR!         web-ifc-viewer@"^1.0.218" from the root project
npm ERR!   2 more (web-ifc-three, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer three@"^0.135.0" from web-ifc-viewer@1.0.218
npm ERR! node_modules/web-ifc-viewer
npm ERR!   web-ifc-viewer@"^1.0.218" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: three@0.135.0
npm ERR! node_modules/three
npm ERR!   peer three@"^0.135.0" from web-ifc-viewer@1.0.218
npm ERR!   node_modules/web-ifc-viewer
npm ERR!     web-ifc-viewer@"^1.0.218" 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! See D:\software\NVM\nodejs\node_cache\eresolve-report.txt for a full report.npm ERR! A complete log of this run can be found in:
npm ERR!     D:\software\NVM\nodejs\node_cache\_logs\2024-12-05T07_02_53_925Z-debug-0.log

解决方案
加入--legacy-peer-deps 如我下载npm install dat.gui 改为npm install dat.gui --legacy-peer-deps

原因

在NPM v7中,现在默认安装peerDependencies。
在很多情况下,这会导致版本冲突,从而中断安装过程。

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词