【发布时间】:2021-05-07 21:09:03
【问题描述】:
我尝试删除所有 npm 包,卸载 ionic 和许多其他东西,但我无法传递此错误。 我什至验证了 typescript 和 react-script 的版本存在(就像在另一个不存在版本的帖子中一样)
完整日志:
λ ionic start myApp
? Framework: React
? Starter template: sidemenu
? .\myApp exists. Overwrite? Yes
√ Preparing directory .\myApp in 10.64ms
√ Downloading and extracting sidemenu starter in 830.02ms
> ionic integrations enable capacitor --quiet -- myApp io.ionic.starter
> npm.cmd i --save -E @capacitor/core
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: typescript@4.1.3
npm ERR! node_modules/typescript
npm ERR! typescript@"4.1.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^3.2.1" from react-scripts@4.0.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts@"4.0.1" 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\<user>\AppData\Local\npm-cache\eresolve-report.txt for a full report.
> npm.cmd i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: typescript@4.1.3
npm ERR! node_modules/typescript
npm ERR! typescript@"4.1.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^3.2.1" from react-scripts@4.0.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts@"4.0.1" 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\<user>\AppData\Local\npm-cache\eresolve-report.txt for a full report.
【问题讨论】:
标签: reactjs ionic-framework npm