fluxy-admin-web icon indicating copy to clipboard operation
fluxy-admin-web copied to clipboard

npm install 安装时项目依赖有冲突

Open MRCHEN3303 opened this issue 1 year ago • 1 comments

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react npm ERR! react@"^18.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.3.0 || ^17.0.0" from [email protected] npm ERR! node_modules/react-sortable-hoc npm ERR! react-sortable-hoc@"^2.0.0" 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. 我们需要react18.2.0版本,但react-sortable-hoc@"^2.0.0"又要求使用react@"^16.3.0 || ^17.0.0",这个怎么解决好?

MRCHEN3303 avatar Mar 30 '24 16:03 MRCHEN3303

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react npm ERR! react@"^18.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.3.0 || ^17.0.0" from [email protected] npm ERR! node_modules/react-sortable-hoc npm ERR! react-sortable-hoc@"^2.0.0" 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. 我们需要react18.2.0版本,但react-sortable-hoc@"^2.0.0"又要求使用react@"^16.3.0 || ^17.0.0",这个怎么解决好?

建议使用 pnpm 安装

dbfu avatar Mar 02 '25 03:03 dbfu