Eslint somehow got messed up, Shopware build fails - npm

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: eslint-config-airbnb-base#13.2.0
npm ERR! Found: eslint#7.10.0
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/eslint-plugin#5.1.0
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 eslint-config-airbnb-base#13.2.0
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/eslint-config-base#1.0.0
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: eslint#5.16.0
npm ERR! node_modules/eslint
npm ERR! peer eslint#"^4.19.1 || ^5.3.0" from eslint-config-airbnb-base#13.2.0
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/eslint-config-base#1.0.0
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!

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.

Related

trying to understand peer dependency problems

if I run npm, it installs everything fine but it tells me I have 19 HIGH severe vulnerabilities.. it tells me to run npm audit fix
but if I do that, I get:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: angular-frontend#0.0.1
npm ERR! Found: rxjs#7.5.7
npm ERR! node_modules/rxjs
npm ERR! rxjs#"~7.5.0" from the root project
npm ERR! peer rxjs#"^6.5.3 || ^7.4.0" from #angular/core#14.2.8
npm ERR! node_modules/#angular/core
npm ERR! #angular/core#"^14.1.0" from the root project
npm ERR! peer #angular/core#">=6.0.0" from #storybook/angular#6.1.21
npm ERR! node_modules/#storybook/angular
npm ERR! dev #storybook/angular#"^6.1.21" from the root project
npm ERR! 7 more (#angular/compiler, #angular/service-worker, ...)
npm ERR! 3 more (#angular/common, ng-packagr, #angular/forms)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs#"^6.0.0" from #storybook/angular#6.1.21
npm ERR! node_modules/#storybook/angular
npm ERR! dev #storybook/angular#"^6.1.21" 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.
My first question is, why is this "not" a problem for installation? (it succeeds, my app builds and runs)...
My second question is, is there not a way to supply the version of rxjs that #storybook/angular#6.1.21 wants? Like, can I not have both rxjs 7.5.7 AND ^6.0.0 and just have ^6.0.0 available for storybook?

Error (code ERESOLVE) when in trying to run the command "npm install" on console log

I'm on a college project where I got a project with angular and typescript, languages which I have difficulty and I'm having problems when trying to run the project
Why when in trying to run the command install
npm install
The console return to me:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: sisgeo#1.0.0
npm ERR! Found: zone.js#0.8.29
npm ERR! node_modules/zone.js
npm ERR! zone.js#"^0.8.19" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer zone.js#"~0.9.1" from #angular/core#8.2.14
npm ERR! node_modules/#angular/core
npm ERR! #angular/core#"^8.2.1" from the root project
npm ERR! peer #angular/core#"8.2.14" from #angular/animations#8.2.14
npm ERR! node_modules/#angular/animations
npm ERR! #angular/animations#"^8.2.1" 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 C:\Users\desou\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\desou\AppData\Local\npm-cache\_logs\2022-09-13T01_56_25_713Z-debug-0.log
You can take a look at this resource (the problem mainly deals with dependency conflicts):
Unable to resolve dependency tree error when installing npm packages

Unable to install vue-property-decorator or vue-class-component, when created project using vite

I have created a Vue3 project using Vite. When Vite is used I am unable to install vue-property-decorator or vue-class-component. It says it is unable to resolve dependency tree. Errors are attached below:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: new-vite-project#0.0.0
npm ERR! Found: vue#3.2.32
npm ERR! node_modules/vue
npm ERR! vue#"^3.2.25" from the root project
npm ERR! peer vue#"*" from vue-property-decorator#9.1.2
npm ERR! node_modules/vue-property-decorator
npm ERR! vue-property-decorator#"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue#"^2.0.0" from vue-class-component#7.2.6
npm ERR! node_modules/vue-class-component
npm ERR! peer vue-class-component#"*" from vue-property-decorator#9.1.2
npm ERR! node_modules/vue-property-decorator
npm ERR! vue-property-decorator#"*" 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/zohaib/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/zohaib/.npm/_logs/2022-04-13T20_02_35_956Z-debug.log
vue-class-component still doesn't officially support Vue 3.
It has a Release Candidate (RC) version though, but it may not be ready for production.
See this comment: vue-class-component issue #406
To install it:
npm install vue-class-component#8.0.0-rc.1 vue-property-decorator#10.0.0-rc.3

Install Pinia with Quasar v2

I'm using Quasar v2, Vue 3 and I'm trying to install Pinia.
Whenever I try to run: npm install pinia or also npm install pinia#next,
it gives me this error:
code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: ui#0.0.1
npm ERR! Found: vue#3.1.5
npm ERR! node_modules/vue
npm ERR! vue#"3.1.5" from #quasar/app#3.0.4
npm ERR! node_modules/#quasar/app
npm ERR! dev #quasar/app#"^3.0.4" from the root project
npm ERR! peer vue#"3.1.5" from #vue/compiler-sfc#3.1.5
npm ERR! node_modules/#vue/compiler-sfc
npm ERR! #vue/compiler-sfc#"3.1.5" from #quasar/app#3.0.4
npm ERR! node_modules/#quasar/app
npm ERR! dev #quasar/app#"^3.0.4" from the root project
npm ERR! peerOptional #vue/compiler-sfc#"^3.0.8" from vue-loader#16.4.1
npm ERR! node_modules/vue-loader
npm ERR! vue-loader#"16.4.1" from #quasar/app#3.0.4
npm ERR! node_modules/#quasar/app
npm ERR! dev #quasar/app#"^3.0.4" from the root project
npm ERR! 5 more (#vue/server-renderer, #vue/test-utils, vue-i18n, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! pinia#"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vue#2.6.14
npm ERR! node_modules/vue
npm ERR! peer vue#"^2.6.14 || ^3.2.0" from pinia#2.0.2
npm ERR! node_modules/pinia
npm ERR! pinia#"*" 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/gii/.npm/eresolve-report.txt for a full report.
Does anyone know how to make this work?
Moreover, since I'm using Typescript, is there a way to configure it already with it via this initial npm command?
You can install Pinia if you remove Vuex first.
Just delete Vuex from your package.json and then you are free to install Pinia.
Faced the same problem while installing pinia from npm having vuex configured in my vue3 app , after couple of try i uninstalled vuex and reinstalled pinia and then it worked fine
If you just want to get everything installed and are not concerned about possibly running incompatible versions: npm install --legacy-peer-deps.
Beyond that, your options get much more involved. You can try updating everything and cross your fingers that all the most up-to-date versions are compatible with each other. You can downgrade dependencies that require newer versions of peer dependencies. And so on.

#react-native-community/datetimepicker install throwing error

I tried to install datetime picker for my react-native (expo) project but, when i try to install it;
expo install #react-native-community/picker
It throws error;
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined#undefined
npm ERR! Found: react#16.13.1
npm ERR! node_modules/react
npm ERR! react#"16.13.1" from the root project
npm ERR! peer react#">=16.8.3" from #react-native-community/datetimepicker#3.2.0
npm ERR! node_modules/#react-native-community/datetimepicker
npm ERR! #react-native-community/datetimepicker#"3.2.0" from the root project
npm ERR! 1 more (react-native)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"17.0.1" from react-native-windows#0.64.12
npm ERR! node_modules/react-native-windows
npm ERR! peer react-native-windows#">=0.62" from #react-native-community/datetimepicker#3.2.0
npm ERR! node_modules/#react-native-community/datetimepicker
npm ERR! #react-native-community/datetimepicker#"3.2.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.
npm ERR!
npm ERR! See C:\Users\irfan\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\irfan\AppData\Local\npm-cache\_logs\2021-06-30T13_38_37_968Z-debug.log
As per this error (if i got it right), this requires a different version of react (17.0.1) which when installed solves the problem but this version of the react is not supported by expo.
Please provide a solution which will be compatible with expo.
After searching for a whole day, i thought to post it here. But just after posting, i got an answer in my mind.
Why not to clone it directly from the github instead of installing it with expo or npm.
Did the same thing and now working fine.
This issue was also raised on github but it had no solutions.