我在React应用程序中安装 particle.js 时遇到以下错误:
code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: app-test@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from react-particles-js@3.4.1
npm ERR! node_modules/react-particles-js
npm ERR! react-particles-js@"*" 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\gydee\AppData\Local\npm-cache\eresolve-report.txt for a full report.
3条答案
按热度按时间sd2nnvve1#
这是来自NPM版本7的问题,使用:
帮我修好了
zvms9eto2#
yks3o0rb3#
npm安装React粒子-js -强制或-遗留对等部署