我不知道为什么,但升级节点后,我无法安装docz依赖关系:(按照以下步骤..
project-name
但我会发现这些错误。
npm install docz
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test@0.1.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0" from docz@2.3.1
npm ERR! node_modules/docz
npm ERR! docz@"*" 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 C:\Users\HP\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Local\npm-cache\_logs\2022-01-05T13_47_05_954Z-debug-0.log请帮帮我,我试过了所有可能的事情,但不明白我缺少的是什么。其实,我认为这是一个问题,我的NPM所以,试图安装纱线,但现在这个错误!
$ npm install --global yarn
changed 1 package, and audited 2 packages in 3s
found 0 vulnerabilities
HP@LAPTOP-P6Q3FNJ2 MINGW64 ~/Desktop (master)
$ yarn --version
C:\Users\HP\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found发布于 2022-01-05 18:09:18
看起来它有问题,因为反应版本不匹配。
尝试的一个解决方案是将--legacy-peer-deps添加到命令的末尾。npm install docz --legacy-peer-deps
https://stackoverflow.com/questions/70596813
复制相似问题