"ERESOLVE unable to resolve dependency tree" when setting up a new project using wdio-v7 - webdriver-io

I am trying to set up a new project using wdio-v7,
firstly I ran npm init -y
then npm install #wdio/cli --save-dev
and after running npx wdio config -y I receive this:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: example-test#1.0.0
npm ERR! Found: #wdio/cli#7.0.5
npm ERR! node_modules/#wdio/cli
npm ERR! dev #wdio/cli#"^7.0.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #wdio/cli#"^6.0.0" from wdio-chromedriver-service#6.0.4
npm ERR! node_modules/wdio-chromedriver-service
npm ERR! dev wdio-chromedriver-service#"*" 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!
Initialize WebdriverIO and setup configuration in your current project.
Documentation: https://webdriver.io
#wdio/cli (v7.0.5)
I tried using --force, or --legacy-peer-deps but unsuccessful.

That is weird, looks like npx wdio config -yis trying to install older version of chrome driver service.
Try to manually install chromedriver service or update the version in package.json
"wdio-chromedriver-service": "^7.0.0"
Make sure you have the min requirements by webdriverio
https://webdriver.io/docs/gettingstarted#system-requirements
Install at least v12.16.1 or higher as this is the oldest active LTS
version Only releases that are or will become an LTS release are
officially supported

Related

Fix the upstream dependency conflict, React Native Expo

I have a React Native Expo application, and I am trying to install expo-splash-screen with running npx expo install expo-splash-screen
As a result I get the following error message:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-navigation-drawer#2.7.2
npm ERR! Found: react-native-gesture-handler#2.5.0
npm ERR! node_modules/react-native-gesture-handler
npm ERR! peer react-native-gesture-handler#">= 1.0.0" from #react-navigation/drawer#6.5.0
npm ERR! node_modules/#react-navigation/drawer
npm ERR! #react-navigation/drawer#"^6.5.0" from the root project
npm ERR! peer react-native-gesture-handler#">= 1.5.0" from react-navigation-stack#2.10.4
npm ERR! node_modules/react-navigation-stack
npm ERR! react-navigation-stack#"^2.10.4" from the root project
npm ERR! 1 more (the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-gesture-handler#"^1.0.12" from react-navigation-drawer#2.7.2
npm ERR! node_modules/react-navigation-drawer
npm ERR! react-navigation-drawer#"^2.7.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react-native-gesture-handler#1.10.3
npm ERR! node_modules/react-native-gesture-handler
npm ERR! peer react-native-gesture-handler#"^1.0.12" from react-navigation-drawer#2.7.2
npm ERR! node_modules/react-navigation-drawer
npm ERR! react-navigation-drawer#"^2.7.2" 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.
While running npm -v react-native-gessture-handler it says: 8.15.0.
I have also tried using npm i react-native-splash-screen --force but it is not good for an expo application, and I am pretty sure that installing react-navigation-drawer with --force resulted the problem.
I am not really experienced with package managing so I do not really get the point of the error message. How can I install expo-splash-screen, and can somebody explain the error message?
It looks you have libraries that use different versions of react-native-gesture-handler. react-navigation-drawer is using and older react-native-gesture-handler version and this package is deprecated so you cannot update it to use a higher version of react-native-gesture-handler.
The best solution in my opinion is to change the package react-navigation-drawer to #react-navigation/drawer as it says in the documentation of the package.
The other alternative but at your own risk is to specify in the package.json a resolution with the react-native-gesture-handler you need in expo-splash-screen and every library that have as peer dependecy react-native-gesture-handler will use this specific version.
"resolutions": {
"react-native-gesture-handler": "x.x.x"
}
Let me know if it helps

Eslint somehow got messed up, Shopware build fails

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.

React Native - Error while initialising new project

I am getting following error when I try to run command
npx react-native init AwesomeProject
npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR!
npm ERR! While resolving: undefined#undefined npm ERR! Found:
react-native#0.68.2 npm ERR! node_modules/react-native npm ERR! peer
react-native#"*" from #react-native-community/cli#7.0.3 npm ERR!
node_modules/#react-native-community/cli npm ERR!
#react-native-community/cli#"^7.0.3" from react-native#0.68.2 npm ERR!
react-native#"0.69.0" from the root project npm ERR! npm ERR! Could
not resolve dependency: npm ERR! react-native#"0.69.0" from the root
project npm ERR! npm ERR! Conflicting peer dependency: react#18.0.0
npm ERR! node_modules/react npm ERR! peer react#"18.0.0" from
react-native#0.69.0 npm ERR! node_modules/react-native npm ERR!
react-native#"0.69.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\NIMASHA NAIK\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\NIMASHA
NAIK\AppData\Local\npm-cache_logs\2022-06-23T13_40_58_714Z-debug-0.log
Please can anyone help?
Thank You.
Removing the ~/.npm cache folder worked for me
rm -r ~/.npm
I had the same problem so I did it
npm config set legacy-peer-deps true
npx react-native
try it worked.
npm add react-native#0.69.0
Run this command to upgrade react-native. Hope it works.
Are you able to post the full log found in your AppData?
You could also try completely removing node.js from your system and try reinstalling it again.
https://nodejs.org/en/
Install the LTS version and try this again. Also make sure npm and npx are both working in your working directory PATH.
This is an issue in node which is caused by white space in user name between first-name and last-name in windows.
run the following command after replacing firstname with your windows user firstname in command prompt with administrator access
npm config set cache "C:\Users\Firstname~1\AppData\Roaming\npm-cache" --global

Git - Cloning Vue.js project and run

I have cloned a project from a Git Repo into my Mac, It only has project files not the node modules.
In GIT : Readme.md says run npm install to setup the project.
When I run the npm install I get below error list, how do I get through it?
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #vue/eslint-config-standard#6.1.0
npm ERR! Found: eslint-plugin-vue#8.7.1
npm ERR! node_modules/eslint-plugin-vue
npm ERR! dev eslint-plugin-vue#"^8.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-vue#"^7.0.0" from #vue/eslint-config-standard#6.1.0
npm ERR! node_modules/#vue/eslint-config-standard
npm ERR! dev #vue/eslint-config-standard#"^6.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: eslint-plugin-vue#7.20.0
npm ERR! node_modules/eslint-plugin-vue
npm ERR! peer eslint-plugin-vue#"^7.0.0" from #vue/eslint-config-standard#6.1.0
npm ERR! node_modules/#vue/eslint-config-standard
npm ERR! dev #vue/eslint-config-standard#"^6.1.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 /Users/dev/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/dev/.npm/_logs/2022-06-23T23_17_06_125Z-debug-0.log
This bug seems current, to reproduce it :
vue create hello-world
Vue CLI v5.0.8
...
npm install
and if you do : rm -rf node_modules then npm install you get error :
npm ERR! While resolving: #vue/eslint-config-standard#6.1.0
And no solution till now
thank you
What I did to get rid of the problem was removing the:
"eslint-plugin-vue": "^8.0.3",
line in the package.json file.
from the "devDependencies" section.
Then I did an
npm install
to download all the dependencies. And after that I downloaded the eslint Vue plugin seperatly with the Vue CLI.
vue add eslint
I don't know if this is the solution to the problem. I just wanted to help.

i cant install vue-router by npm

i want to install vue-router but some errors occurs
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: routing01#1.0.0
npm ERR! Found: vue#2.6.14
npm ERR! node_modules/vue
npm ERR! vue#"^2.5.11" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue#"^3.2.0" from vue-router#4.0.15
npm ERR! node_modules/vue-router
npm ERR! vue-router#"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 C:\Users\Peyman\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\Peyman\AppData\Local\npm-cache\_logs\2022-05-31T07_48_48_170Z-debug-0.log
The problem is you have incompatible versions of vue and vue-router.
vue#2 requires vue-router#3
vue#3 requires vue-router#4
The error message indicates you have vue#2.6.14, and you're trying to install vue-router#4.0.15. Note that npm install -S vue-router (without a version specifier) defaults to the latest version, which is currently 4.0.15.
Don't use the --force or --legacy-peer-deps npm flags that are suggested in the error message because that would only install incompatible packages that would result in a runtime error.
Solution
A quick fix is to install vue-router#3:
npm install -S vue-router#3
Or you can upgrade to Vue 3, which requires uninstalling vue-template-compiler (the template compiler for Vue 2) and installing #vue/compiler-sfc (the template compiler for Vue 3):
npm uninstall -S vue-template-compiler
npm install -S vue#3 #vue/compiler-sfc
you can add by using plugin also using vue-cli.
try vue add router
btw use can install vuetify and eslint and many more things using vue add vuetify and vue add eslint
you can refer this: https://cli.vuejs.org/guide/plugins-and-presets.html#plugins
Try -
npm install --save --legacy-peer-deps
This command will tell npm to ignore peer dependencies