G6 icon indicating copy to clipboard operation
G6 copied to clipboard

npm install fails

Open ensconced opened this issue 3 years ago • 1 comments

Describe the bug

I would like to contribute to the project but am having some trouble: npm install fails for a fresh clone of the repo. The error message is:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/tslint
npm ERR!   tslint@"^6.1.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer tslint@"^5.11.0" from [email protected]
npm ERR! node_modules/tslint-config-airbnb
npm ERR!   tslint-config-airbnb@"^5.11.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/tslint
npm ERR!   peer tslint@"^5.11.0" from [email protected]
npm ERR!   node_modules/tslint-config-airbnb
npm ERR!     tslint-config-airbnb@"^5.11.2" 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/joe/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/joe/.npm/_logs/2022-09-06T20_56_17_429Z-debug-0.log

This is using npm version 8.11.0. Is this the wrong version? I don't see the correct version of node listed anywhere. I see there is a similar recent issue here but it was closed - I don't understand why.

Your Example Website or App

none

Steps to Reproduce the Bug or Issue

git clone [email protected]:antvis/G6.git
cd G6
npm install

Expected behavior

Expected npm install to complete with exit code 0. But it exits with exit code 1 and the error shown above.

Screenshots or Videos

No response

Platform

  • OS: macOS

Additional context

No response

ensconced avatar Sep 06 '22 21:09 ensconced

Switching to yarn as suggested in https://github.com/antvis/G6/issues/3903 seems to fix it - I will raise a PR to change the README to use yarn instead.

ensconced avatar Sep 06 '22 21:09 ensconced