请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

npm install failed

老师,有一个dependency 冲突,这个怎么解决呀?

mockjira % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: mockjira@0.1.0
npm ERR! Found: @craco/craco@6.1.2
npm ERR! node_modules/@craco/craco
npm ERR! @craco/craco@"^6.1.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @craco/craco@"^5.5.0" from craco-less@1.17.1
npm ERR! node_modules/craco-less
npm ERR! craco-less@"^1.17.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.

正在回答 回答被采纳积分+3

1回答

Nolan 2021-05-20 10:05:56

看下这里吧:https://stackoverflow.com/questions/64936044/fix-the-upstream-dependency-conflict-installing-npm-packages

0 回复 有任何疑惑可以回复我~
  • 提问者 慕勒3007982 #1
    老师,我试过这个,安装npm install --legacy-peer-deps后,就出现:
    /Users/yongbozuo/shua/imooc/mockjira/mockjira/node_modules/react-scripts/scripts/start.js:19
      throw err;
      ^
    
    TypeError: chalk.constructor is not a constructor
        at formatter (/Users/yongbozuo/shua/imooc/mockjira/mockjira/node_modules/react-dev-utils/typescriptFormatter.js:23:18)
        at format (/Users/yongbozuo/shua/imooc/mockjira/mockjira/node_modules/react-dev-utils/WebpackDevServerUtils.js:154:31)
        at Array.map (<anonymous>)
        at /Users/yongbozuo/shua/imooc/mockjira/mockjira/node_modules/react-dev-utils/WebpackDevServerUtils.js:157:67
        at SyncHook.eval [as call] (eval at create (/Users/yongbozuo/shua/imooc/mockjira/mockjira/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
        at SyncHook.lazyCompileHook (/Users/yongbozuo/shua/imooc/mockjira/mockjira/node_modules/tapable/lib/Hook.js:154:20)
    回复 有任何疑惑可以回复我~ 2021-05-22 13:53:28
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信