嗨,我刚刚克隆了我的存储库并尝试安装 nnpm,但出现此错误
npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react@16.13.0
npm ERR! node_modules/react
npm ERR! react@"16.13.0" from the root project
npm ERR! peer react@">=16.8" from framer-motion@2.9.5
npm ERR! node_modules/framer-motion
npm ERR! framer-motion@"^2.7.5" from the root project
npm ERR! 23 more (react-dom, next, rc-drawer, react-custom-scrollbars, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.13.1 || ^17.0.0" from @mdx-js/react@1.6.22
npm ERR! node_modules/@theme-ui/mdx/node_modules/@mdx-js/react
npm ERR! @mdx-js/react@"^1.0.0" from @theme-ui/mdx@0.3.5
npm ERR! node_modules/@theme-ui/mdx
npm ERR! @theme-ui/mdx@"0.3.5" from theme-ui@0.3.5
npm ERR! node_modules/theme-ui
npm ERR! theme-ui@"^0.3.1" from the root project
npm ERR! 1 more (@theme-ui/theme-provider)
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.
答案 0 :(得分:0)
所以,如果我想通了,我必须更改 nodejs 的版本,如果版本 16 不起作用,但它在版本 14 上工作。