问题描述
我克隆了 Vue2Vis 并执行了命令
npm install --save @vue2vis/graph2d vis-data moment
按照 packages/graph2d/README.md
文件中的规定。结果如下:
npm install --save @vue2vis/graph2d vis-data moment
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @vue2vis/graph2d@1.0.1-alpha.0
npm ERR! Found: uuid@7.0.3
npm ERR! node_modules/uuid
npm ERR! dev uuid@"^7.0.0" from @vue2vis/graph2d@1.0.1-alpha.0
npm ERR! packages/graph2d
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer uuid@"^3.4.0" from vis-timeline@7.3.4
npm ERR! node_modules/vis-timeline
npm ERR! vis-timeline@"^7.3.4" from @vue2vis/graph2d@1.0.1-alpha.0
npm ERR! packages/graph2d
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 /Users/erlebach/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/erlebach/.npm/_logs/2021-06-21T22_11_11_109Z-debug.log
我认为这个程序是万无一失的! :-) 有没有人有任何见解可以帮助我?谢谢。
解决方法
vis-data
的最新版本 (7.x) 现在似乎与 graph2d
不兼容。堆栈跟踪中的其他错误似乎与 vis-data
7.
在安装中指定 vis-data@^6.3.0
没有错误:
$ npm install --save @vue2vis/graph2d vis-data@^6.3.0 moment
added 15 packages,and audited 16 packages in 4s
3 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities