hustcc / echarts-for-react

⛳️ Apache ECharts components for React wrapper. 一个简单的 Apache echarts 的 React 封装。
https://git.hust.cc/echarts-for-react
MIT License
4.56k stars 634 forks source link

Error installing dependencies #519

Open ZeRego opened 1 year ago

ZeRego commented 1 year ago

Trying to npm install after cloning the repo.

Getting the following error:

❯ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: echarts-for-react@3.0.2
npm ERR! Found: jest@26.6.3
npm ERR! node_modules/jest
npm ERR!   dev jest@"^26.6.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer jest@"^24.0.0" from jest-electron@0.1.12
npm ERR! node_modules/jest-electron
npm ERR!   dev jest-electron@"^0.1.11" 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 /Users/.../.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/.../.npm/_logs/2022-11-24T15_00_27_238Z-debug-0.log

Updated jest-electron to latest version without success "jest-electron": "^0.1.12",

I was able to install dependencies after changing the jest packages from v26 to v24.

"@types/jest": "^24.0.0",
"jest": "^24.0.0",
"ts-jest": "^24.0.0",
seabean1999 commented 1 year ago

helpful to reduce the version of jest