我正在尝试在我的Create-React-App项目中设置TailwindCSS,并且我正在尝试安装craco,这样我就不需要弹出我的CRA
当我运行以下命令npm install @craco/craco时,我得到unable to resolve dependency tree错误。下面是错误的详细信息。我该怎么办?谢谢
npm install @craco/craco
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: exchange@0.1.0
npm ERR! Found: react-scripts@3.4.3
npm ERR! node_modules/react-scripts
npm ERR! react-scripts@"3.4.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-scripts@"^4.0.0" from @craco/craco@6.1.1
npm ERR! node_modules/@craco/craco
npm ERR! @craco/craco@"*" 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! 发布于 2021-04-13 09:23:12
我已经将我的包react-scripts更新到了最新版本4.x。通过运行此命令:
npm i react-scripts@latest然后,你瞧,我能够成功地安装craco了。
https://stackoverflow.com/questions/67056349
复制相似问题