Skip to content
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

npm install peer dependency resolution fails #270

Open
karlhorky opened this issue Sep 5, 2023 · 2 comments
Open

npm install peer dependency resolution fails #270

karlhorky opened this issue Sep 5, 2023 · 2 comments

Comments

@karlhorky
Copy link
Member

https://replit.com/@karlhorky/node-random-emoji-generator-fall-2023-vienna-austria-x

$ npm i
npm notice 
npm notice New major version of npm available! 8.19.2 -> 10.0.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.0.0
npm notice Run npm install -g [email protected] to update!
npm notice 
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   peer @typescript-eslint/parser@"^6.3.0" from [email protected]
npm ERR!   node_modules/eslint-config-upleveled
npm ERR!     dev eslint-config-upleveled@"^5.0.4" from the root project
npm ERR!   peer @typescript-eslint/parser@"^6.0.0 || ^6.0.0-alpha" from @typescript-eslint/[email protected]
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     peer @typescript-eslint/eslint-plugin@"^6.3.0" from [email protected]
npm ERR!     node_modules/eslint-config-upleveled
npm ERR!       dev eslint-config-upleveled@"^5.0.4" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @typescript-eslint/parser@"^4.0.0 || ^5.0.0" from [email protected]
npm ERR! node_modules/eslint-plugin-jsx-expressions
npm ERR!   peer eslint-plugin-jsx-expressions@"^1.3.1" from [email protected]
npm ERR!   node_modules/eslint-config-upleveled
npm ERR!     dev eslint-config-upleveled@"^5.0.4" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   peer @typescript-eslint/parser@"^4.0.0 || ^5.0.0" from [email protected]
npm ERR!   node_modules/eslint-plugin-jsx-expressions
npm ERR!     peer eslint-plugin-jsx-expressions@"^1.3.1" from [email protected]
npm ERR!     node_modules/eslint-config-upleveled
npm ERR!       dev eslint-config-upleveled@"^5.0.4" 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 /home/runner/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-09-05T11_35_09_217Z-debug-0.log
@karlhorky
Copy link
Member Author

@karlhorky
Copy link
Member Author

npm Overrides from installed packages are not considered while installing, so we can't add an "overrides" key to the package.json file in eslint-config-upleveled, it will not be respected:

Only Root Package May Contain Overrides

The overrides key will only be considered when it is in the root package.json file for a project. overrides in installed dependencies (including workspaces) will not be considered in dependency tree resolution.

https://github.com/npm/rfcs/blob/main/accepted/0036-overrides.md#only-root-package-may-contain-overrides

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

No branches or pull requests

1 participant