[BUG] NPM7 Fails to install: unmet peer dependency with Cypress 5+ - "could not resolve dependency"
See original GitHub issueWhat tool(s) are you using?
-
accessibility-checker-engine
-
accessibility-checker
-
karma-accessibility-checker
-
rule-server
-
boilerplates
-
other
-cypress-accessibility-checker
Detailed description
Node version: 16.5.0 NPM version: 7.19.1 Platform: MacOS
Due to changes in NPMs package lock (lockfileversion 2), an error is thrown on
npm i
when using any version of Cypress that is not explicitly called out as a peer dependency of thecypress-accessibility-checker
package.
Steps to reproduce the issue
- install the latest version of node
- add
cypress
to your package as a dev dependency (we are on v8.3.0) - add
cypress-accessibility-checker
as a dev dependency (we are on v3.1.9) - run
npm install
Additional information
- our project’s package.json:
"devDependencies": { "@babel/core": "7.14.6", "@cypress/webpack-preprocessor": "5.9.1", "@mural/ds-manifest-builder": "0.0.0", "@storybook/addon-a11y": "6.3.4", "@storybook/addon-actions": "6.3.4", "@storybook/addon-essentials": "6.3.4", "@storybook/addon-links": "6.3.4", "@storybook/html": "6.3.4", "@storybook/react": "6.3.4", "@types/fs-extra": "9.0.12", "babel-loader": "8.2.2", "cypress": "8.2.0", "cypress-accessibility-checker": "3.1.9", "rimraf": "3.0.2", "ts-loader": "8.3.0" }, "dependencies": { "@mural/ds-component-button": "0.0.0", "@mural/component-starter": "0.0.0", "@mural/ds-config": "0.0.0" }
- error output in terminal:
npm ERR! Found: cypress@8.2.0 npm ERR! node_modules/cypress npm ERR! cypress@"8.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer cypress@"^3 || ^4" from cypress-accessibility-checker@3.1.9 npm ERR! node_modules/cypress-accessibility-checker npm ERR! cypress-accessibility-checker@"3.1.9" 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!
Temporary Solution:
The can be fixed by running npm install --legacy-peer-deps
- but this may require that other peer dependencies need to be added to your package to meet all requirements of other packages.
Solving this Bug:
This bug can be solved by ensuring that the peerDependencies
object of the cypress-accessibility-checker
package is either maintained with new releases of cypress or removed.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How do I fix the npm UNMET PEER DEPENDENCY warning?
UNMET PEER DEPENDENCY error is thrown when the dependencies of one or more modules specified in the package.json file is not met.
Read more >peer dependency confilct when creating projects using vue 2 ...
receive an error says "ERESOLVE unable to resolve dependency tree". Detail: ... Could not resolve dependency: npm ERR! peer vue@"3.0.5" from ...
Read more >Error npm UNMET PEER DEPENDENCY warning - Edureka
UNMET PEER DEPENDENCY error is thrown when the dependencies of one or more modules specified in the package.json file is not met.
Read more >The Step-by-Step Guide to Understanding and Adopting npm 7
Here we remove the peer dependency, react , from the package.json file. Since React is part of grommet's peer dependencies, it will be...
Read more >Unable to resolve dependency tree error in Angular while ...
To fix Unable to resolve dependency tree error in Angular while installing `npm` packages follow the below steps. 1. Run `npm install --save ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay, pretty easy PR. We have a couple of other changes in the pipeline that should wrap up today or tomorrow. Should be out to NPM fairly soon.
@ryandudek Should be deployed as 3.1.10