Skip to content

error when using npm to run install #6804

Description

@nicolethoen

when using npm 8 to execute npm install I get the following error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: eslint-plugin-patternfly-react@4.23.2
npm ERR! Found: eslint@8.7.0
npm ERR! node_modules/eslint
npm ERR!   peer eslint@">=5" from eslint-plugin-patternfly-react@4.23.2
npm ERR!   packages/eslint-plugin-patternfly-react
npm ERR!     eslint-plugin-patternfly-react@4.23.2
npm ERR!     node_modules/eslint-plugin-patternfly-react
npm ERR!       workspace packages/eslint-plugin-patternfly-react from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^4.9.0" from eslint-config-airbnb@16.1.0
npm ERR! node_modules/eslint-config-airbnb
npm ERR!   eslint-config-airbnb@"^16.1.0" from eslint-plugin-patternfly-react@4.23.2
npm ERR!   packages/eslint-plugin-patternfly-react
npm ERR!     eslint-plugin-patternfly-react@4.23.2
npm ERR!     node_modules/eslint-plugin-patternfly-react
npm ERR!       workspace packages/eslint-plugin-patternfly-react 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/nthoen/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/nthoen/.npm/_logs/2022-01-17T13_07_09_970Z-debug-0.log

It seems - according to stack overflow that "When using npm 7, this comes up a lot because peer dependencies issues are treated as errors in version 7 whereas they were generally only warnings in version 6. Usually using --legacy-peer-deps makes it work with npm 7[+].”

When I run npm install --legacy-peer-deps, the install works with no errors.

It seems we might need to either readdress our dependencies, or update our README to suggest adding the flag or opting for yarn to perform the install


Jira Issue: PF-190

Activity

  1. jonkoops commented on Jan 17, 2022

    @jonkoops
    Contributor

    Is there really still a convincing reason to use Yarn at all? Considering that all of the tooling should work with NPM v7.

  2. stale commented on Mar 18, 2022

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

  3. jonkoops commented on Apr 4, 2022

    @jonkoops
    Contributor

    @nicolethoen This is probably still relevant no?

  4. jonkoops commented on Apr 27, 2022

    @jonkoops
    Contributor

    Note that in order to support NPM the support for Yarn will have to be dropped as their lockfile formats are incompatible. We are talking about running npm install in the root of this repository, correct?

  5. nicolethoen commented on Apr 28, 2022

    @nicolethoen
    ContributorAuthor

    hm.... I think when I opened this, I assumed that we were supporting both. If we can only choose one or the other, I guess we will have to consider which one is actually best - the PF team is definitely in the habit of using Yarn, but that's not necessarily a good reason to opt for Yarn...

  6. moved this from Done to Not started in PatternFly Issueson Apr 28, 2022
  7. jonkoops commented on Apr 29, 2022

    @jonkoops
    Contributor

    Yarn does have some possible advantages such as Plug'n'Play and Zero-Installs. However these features are currently not being used in this repository.

  8. jonkoops commented on Apr 29, 2022

    @jonkoops
    Contributor

    Note that if we are going to evaluate package managers then PNPM is also worth taking a look at.

  9. moved this from Not started to Backlog in PatternFly Issueson Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions