Unable resolve dependency after vue upgrade - node.js

I try to upgrade my vue version from 3.0.2 to latest version with syntax:
vue upgrade
after that, my vue #vue/cli-service is upgraded to 5.0.8
But then when the process is want to upgade #vue/cli-plugin-babel and #vue/cli-plugin-eslint it say an error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: app-backend-vue#0.1.0
npm ERR! Found: eslint#6.8.0
npm ERR! node_modules/eslint
npm ERR! dev eslint#"^6.8.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint#">=7.5.0" from #vue/cli-plugin-eslint#5.0.8
npm ERR! node_modules/#vue/cli-plugin-eslint
npm ERR! dev #vue/cli-plugin-eslint#"^5.0.8" 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 devDependencies in package.json:
"devDependencies": {
"#vue/cli-plugin-babel": "^4.5.19",
"#vue/cli-plugin-eslint": "^4.5.19",
"#vue/cli-service": "~5.0.8",
"#vue/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.8.0",
"eslint-plugin-vue": "^7.0.0-0"
},
How to fix this? And how to clearly upgrade my vue version?
Before the upgrade, my devDependencies were
"#vue/cli-plugin-babel": "~4.5.0",
"#vue/cli-plugin-eslint": "~4.5.0",
"#vue/cli-service": "~4.5.0",
"#vue/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.8.0",
"eslint-plugin-vue": "^7.0.0-0"

Related

how to fix npm install for react native

i am using react native to build a app every time I try to install a npm package i have to use --force, or --legacy-peer-deps to make it install else i get error so i thought it is because of version of react in my pakgage.json so i dissided to downgrade my react to 17.0.1 from 18.1.0 and i deleted my pakage.lock.json and node modules and i tried npm i then I am getting this error i want to get a clean installation for react native
npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: sukprsavam#0.0.1
npm ERR! Found: react#17.0.1
npm ERR! node_modules/react
npm ERR! react#"17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native#"^0.0.0-0 || 0.60 - 0.71 || 1000.0.0" from #react-native-async-storage/async-storage#1.17.11
npm ERR! node_modules/#react-native-async-storage/async-storage
npm ERR! #react-native-async-storage/async-storage#"^1.17.11" 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! peer react#"18.1.0" from react-native#0.70.6
npm ERR! node_modules/react-native
npm ERR! react-native#"0.70.6" from the root project
npm ERR! peer react-native#"^0.0.0-0 || 0.60 - 0.71 || 1000.0.0" from #react-native-async-storage/async-storage#1.17.11
npm ERR! node_modules/#react-native-async-storage/async-storage
npm ERR! #react-native-async-storage/async-storage#"^1.17.11" 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\vivek\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\vivek\AppData\Local\npm-cache\_logs\2023-01-04T06_02_30_598Z-debug-0.log
"name": "newapp",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"#react-navigation/native": "^6.1.1",
"#react-navigation/native-stack": "^6.9.7",
"axios": "^1.2.2",
"expo": "~47.0.9",
"expo-status-bar": "~1.4.2",
"moment": "^2.29.4",
"react": "18.1.0",
"react-client-session": "^0.0.8",
"react-native": "0.70.5",
"react-native-network-logger": "^1.13.0",
"react-native-paper": "^5.1.2",
"react-native-safe-area-context": "4.4.1",
"react-native-screens": "~3.18.0",
"react-navigation": "^4.4.4"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}

how to resolve dependency tree typeorm and nestjs during node modules installation

During installation of a Nest Application node modules, I have the following error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ticket-be#0.1.3
npm ERR! Found: typeorm#0.2.45
npm ERR! node_modules/typeorm
npm ERR! typeorm#"^0.2.45" from the root project
npm ERR! peer typeorm#"^0.2.25" from #nestjs-query/query-typeorm#0.30.0
npm ERR! node_modules/#nestjs-query/query-typeorm
npm ERR! #nestjs-query/query-typeorm#"^0.30.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typeorm#"^0.3.0" from #nestjs/typeorm#8.1.4
npm ERR! node_modules/#nestjs/typeorm
npm ERR! #nestjs/typeorm#"^8.0.3" from the root project
npm ERR! peer #nestjs/typeorm#"^8.0.0" from #nestjs-query/query-typeorm#0.30.0
npm ERR! node_modules/#nestjs-query/query-typeorm
npm ERR! #nestjs-query/query-typeorm#"^0.30.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.
Can you give me suggestions to resolve dependency? Or is better to use --force or --legacy-peer-deps?
Thank you in advance.
Here dependencies section of my package.json
"dependencies": {
"#nestjs-modules/mailer": "^1.6.1",
"#nestjs-query/query-typeorm": "^0.30.0",
"#nestjs/common": "^8.4.4",
"#nestjs/config": "^2.0.0",
"#nestjs/core": "^8.0.0",
"#nestjs/jwt": "^8.0.0",
"#nestjs/mapped-types": "*",
"#nestjs/passport": "^8.2.1",
"#nestjs/platform-express": "^8.0.0",
"#nestjs/swagger": "^5.2.1",
"#nestjs/typeorm": "^8.0.3",
"#types/bcrypt": "^5.0.0",
"#types/cookie-parser": "^1.4.2",
"bcrypt": "^5.0.1",
"class-transformer": "^0.4.0",
"class-validator": "^0.13.2",
"cookie-parser": "^1.4.6",
"fastify-swagger": "^5.1.0",
"handlebars": "^4.7.7",
"joi": "^17.6.0",
"passport": "^0.5.2",
"passport-jwt": "^4.0.0",
"passport-local": "^1.0.0",
"pdfmake": "^0.2.5",
"pg": "^8.7.3",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.2.0",
"swagger-themes": "^1.2.22",
"swagger-ui-express": "^4.3.0",
"typeorm": "^0.2.45",
"uuid": "^8.3.2",
"webpack": "^5.72.1"
}
I tried to remove "typeorm": "^0.2.45" from package.json, but I have same type error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ticket-be#0.1.3
npm ERR! Found: typeorm#0.3.10
npm ERR! node_modules/typeorm
npm ERR! peer typeorm#"^0.3.0" from #nestjs/typeorm#8.1.4
npm ERR! node_modules/#nestjs/typeorm
npm ERR! #nestjs/typeorm#"^8.0.3" from the root project
npm ERR! peer #nestjs/typeorm#"^8.0.0" from #nestjs-query/query-typeorm#0.30.0
npm ERR! node_modules/#nestjs-query/query-typeorm
npm ERR! #nestjs-query/query-typeorm#"^0.30.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typeorm#"^0.2.25" from #nestjs-query/query-typeorm#0.30.0
npm ERR! node_modules/#nestjs-query/query-typeorm
npm ERR! #nestjs-query/query-typeorm#"^0.30.0" from the root project
#nestjs/typeorm#8.1.4 requires that you use typeorm#^0.3.0 but #nestjs-query/query-typeorm#"^0.30.0" requires that you use typeorm#^0.2.25. You need to downgrade #nestjs/typeorm to something that is compatible with #nestjs-query/query-typeorm or upgrade #nestjs-query/query-typeorm to something that has a compatible typeorm version with #nestjs/typeorm#^8.1.4
I fixed version:
"#nestjs/typeorm": "8.0.3"
and now it works, thanks #jay-mcdoniel

Can't resolve some dependency errors in nodejs

I was trying to install dependencies of a website and I get this error that I couldn't solve following some of the already published solutions.
Here is the error. Thanks in advance for your help.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: samar#0.1.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^0.14.0 || ^15.0.0" from react-rangeslider#2.2.0
npm ERR! node_modules/react-rangeslider
npm ERR! react-rangeslider#"^2.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 /home/intelligentica/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/intelligentica/.npm/_logs/2022-03-23T15_30_51_251Z-debug-0.log
The package.json file is here.
{
"name": "samar",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev -p 5000",
"build": "next build",
"start": "next start",
"sass": "node-sass --watch scss/main.scss css/style.css --source-map css/style.css.map"
},
"dependencies": {
"moment": "^2.29.1",
"next": "^10.0.6",
"node-sass": "^5.0.0",
"react": "^17.0.1",
"react-bootstrap": "^1.5.0",
"react-countup": "^4.3.3",
"react-dom": "^17.0.1",
"react-google-recaptcha": "^2.1.0",
"react-modal-video": "^1.2.6",
"react-rangeslider": "^2.2.0",
"react-router-dom": "^5.2.0",
"react-scroll-to-top": "^1.0.5",
"react-slick": "^0.28.0",
"react-visibility-sensor": "^5.1.1",
"simple-react-lightbox": "^3.6.6",
"slick-carousel": "^1.8.1",
"use-scroll-position": "0.0.4",
"wowjs": "^1.1.3"
}
}
I would suggest you to delete the node-modules folder and make sure to install dependencies latest version by adding
npm i packagename#latest
Delete the node_modules folder and install the dependencies using --force, or --legacy-peer-deps
npm install --force

React application from github not running on VS Code

sorry for newbie question. I have downloaded a react application from github. When I try to run locally on VS Code it gives me some dependencies errors.
Below is the dependencies on the json file:
"dependencies": {
"#chakra-ui/react": "^1.8.5",
"#emotion/react": "^11",
"#emotion/styled": "^11",
"#hookform/resolvers": "^2.8.8",
"algoliasearch": "^4.12.1",
"axios": "^0.26.0",
"framer-motion": "^6",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hook-form": "^7.27.1",
"react-icons": "^4.3.1",
"react-images-uploading": "^3.1.3",
"react-instantsearch-dom": "^6.22.0",
"react-query": "^3.34.16",
"react-router-dom": "^6.2.1",
"react-table": "^7.7.0",
"recharts": "^2.1.9",
"sass": "^1.49.9",
"yup": "^0.32.11",
"zustand": "^3.7.0"
}
Error:
npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: admin-family#0.0.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0" from react-images-uploading#3.1.3
npm ERR! node_modules/react-images-uploading
npm ERR! react-images-uploading#"^3.1.3" 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\12392\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\12392\AppData\Local\npm-cache\_logs\2022-03-09T00_59_26_007Z-debug-0.log
Running node v16.14.0
Any help on this appreciated.
run npm install --force or npm install --legacy-peer-deps
this will fix the error, because it ignores the peer dependencies and focuses on the main dependencies.
this has worked for me whenever i've gotten this error

How to install bcrypt for nodejs on Openshift?

Using https://github.com/icflorescu/openshift-cartridge-nodejs to get recent version of node, I ran npm install and got the following error:
npm ERR! Linux 2.6.32-573.12.1.el6.x86_64
npm ERR! argv "/var/lib/openshift/56c8cd172d527182dd0000e7/app-root/data/.nodejs/bin/node" "/var/lib/openshift/56c8cd172d527182dd0000e7/app-root/data/.nodejs/bin/npm" "install"
npm ERR! node v5.6.0
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! bcrypt#0.8.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#0.8.5 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/lib/openshift/56c8cd172d527182dd0000e7/app-root/runtime/repo/src/bookmap/npm-debug.log
I already tried to explicitly list node-gyp as a dependency in package.json, which results in the same error. Here's my current dependencies from package.json:
"dependencies": {
"angular": "^1.4.8",
"angular-datepicker": "~1.0.5",
"angular-route": "^1.4.8",
"angular-simple-logger": "^0.1.7",
"angular-ui-bootstrap": "^0.14.3",
"node-gyp": "",
"bcrypt": "^0.8.5",
"body-parser": "^1.14.1",
"bootstrap": "^3.3.6",
"bower": "^1.3.9",
"express": "^4.13.3",
"gulp": "^3.8.7",
"gulp-connect": "^2.0.6",
"jwt-simple": "^0.4.0",
"leaflet": "^0.7.7",
"lodash": "^3.10.1",
"path": "^0.12.7",
"pg": "^4.4.3",
"ui-leaflet": "^1.0.0",
"winston": "^2.1.1"
}
node-gyp installs just fine with npm install node-gyp.
I recommend using the javascript version of bcrypt so you don't have to deal with building it on openshift. We use bcrypt-nodejs on openshift and it works well https://www.npmjs.com/package/bcrypt-nodejs
All you need is just to put it under dependencies in package.json. This is what we have but you can check and get the latest version:
"bcrypt-nodejs": ">=0.0.3",
bcrypt-nodejs is not working in openshift.
use this https://www.npmjs.com/package/bcryptjs

Resources