I have a big problem with the Node.js module eslint
within Shopware 6. Out of nowhere I get an error message about a conflicting dependency while building Showpware's storefront and administration:
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/eslint
npm ERR! dev eslint@"7.10.0" from the root project
npm ERR! peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0" from @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR! @typescript-eslint/eslint-plugin@"5.1.0" from the root project
npm ERR! 14 more (@typescript-eslint/experimental-utils, eslint-utils, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^4.19.1 || ^5.3.0" from [email protected]
npm ERR! node_modules/eslint-config-airbnb-base
npm ERR! dev eslint-config-airbnb-base@"13.2.0" from the root project
npm ERR! eslint-config-airbnb-base@"^13.2.0" from @shopware-ag/[email protected]
npm ERR! node_modules/@shopware-ag/eslint-config-base
npm ERR! @shopware-ag/eslint-config-base@"1.0.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/eslint
npm ERR! peer eslint@"^4.19.1 || ^5.3.0" from [email protected]
npm ERR! node_modules/eslint-config-airbnb-base
npm ERR! dev eslint-config-airbnb-base@"13.2.0" from the root project
npm ERR! eslint-config-airbnb-base@"^13.2.0" from @shopware-ag/[email protected]
npm ERR! node_modules/@shopware-ag/eslint-config-base
npm ERR! @shopware-ag/eslint-config-base@"1.0.0" 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.
Neither did I manually modify any parts of the Shopware core nor did I install any updates. This error message shows up when I run build.sh
. At some point it executes build-js.sh
which crashes immediately. This also happened to other Shopware installations we maintain. I also tried to reinstall a broken installation from scratch but after some time it shows the same error message when I start the building process.
All affected installations run with Shopware 6.4.x.x. Node.js is 16.15.1 LTS, npm is 8.11.0
Any help with this is greatly appreciated!
CodePudding user response:
I remember that this problem existed a while ago. The problem is that Node 16.15.1 bumped the NPM version from 8.5.5 to 8.11.0. This causes the peer dependency problem. However, we fixed this issue in mid-May. So with trunk and the latest 6.4 release, the problem should vanish. If that's not the case, try to fix this by changing npm to a version <8.11.0.