Skip to content

resolved the eellak#8 issue for dependency error #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

MUSTAFA892
Copy link

Installation Issue

Problem

When running npm install, you may encounter an error similar to the following:

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error   react@"^18.3.1" from the root project
npm error   peer react@"^18.0.0" from @testing-library/[email protected]
npm error   node_modules/@testing-library/react
npm error   @testing-library/react@"^13.4.0" from the root project
npm error   7 more (react-dom, react-graph-vis, react-loader-spinner, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.0.0" from [email protected]
npm error node_modules/react-vis-network
npm error   react-vis-network@"^1.0.0" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/react
npm error   peer react@"^16.0.0" from [email protected]
npm error   node_modules/react-vis-network
npm error   react-vis-network@"^1.0.0" from the root project
npm error

This error occurs due to a version conflict between the version of react installed in your project ([email protected]) and the peer dependency required by the react-vis-network package (react@^16.0.0).

Resolution

To resolve this issue, use the following command to bypass the peer dependency conflict:

npm install --legacy-peer-deps

Explanation

  • The --legacy-peer-deps flag tells npm to ignore peer dependency conflicts and install the packages anyway.
  • This is often helpful when a package hasn't been updated to support newer versions of its dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants