How to read ERESOLVE in npm audit fix? - npm

Here is the output I have after getting audit warnings after installing an npm package:
$ npm audit fix
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: eslint-config-standard-with-typescript#21.0.1
npm ERR! Found: #typescript-eslint/eslint-plugin#5.46.1
npm ERR! node_modules/#typescript-eslint/eslint-plugin
npm ERR! dev #typescript-eslint/eslint-plugin#"^5.46.1" from the root project
npm ERR! peerOptional #typescript-eslint/eslint-plugin#"^5.0.0" from eslint-plugin-unused-imports#2.0.0
npm ERR! node_modules/eslint-plugin-unused-imports
npm ERR! dev eslint-plugin-unused-imports#"^2.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #typescript-eslint/eslint-plugin#"^4.0.1" from eslint-config-standard-with-typescript#21.0.1
npm ERR! node_modules/eslint-config-standard-with-typescript
npm ERR! dev eslint-config-standard-with-typescript#"^21.0.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #typescript-eslint/eslint-plugin#4.33.0
npm ERR! node_modules/#typescript-eslint/eslint-plugin
npm ERR! peer #typescript-eslint/eslint-plugin#"^4.0.1" from eslint-config-standard-with-typescript#21.0.1
npm ERR! node_modules/eslint-config-standard-with-typescript
npm ERR! dev eslint-config-standard-with-typescript#"^21.0.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!
npm ERR! For a full report see:
npm ERR! /Users/lancepollard/.npm/_logs/2023-01-02T17_19_47_490Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lancepollard/.npm/_logs/2023-01-02T17_19_47_490Z-debug-0.log
That came after running npm audit fix --force a few times, after getting this:
$ npm install eslint-plugin-unused-imports --save-dev
added 2 packages, and audited 379 packages in 4s
107 packages are looking for funding
run `npm fund` for details
5 high severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
Any ideas what I should be doing here to resolve and get a successful install?
My package.json is:
{
"main": "./host",
"type": "module",
"scripts": {
"build": "tsc && tsc-alias",
"watch": "concurrently --kill-others \"tsc -w\" \"tsc-alias -w\"",
"lint": "eslint --ext .ts ./make",
"lint:fix": "npm run lint -- --fix",
"test": "node host/task/build"
},
"devDependencies": {
"#trivago/prettier-plugin-sort-imports": "^4.0.0",
"#types/glob": "^8.0.0",
"#types/lodash": "^4.14.191",
"#types/node": "^18.11.17",
"#typescript-eslint/eslint-plugin": "^5.46.1",
"#typescript-eslint/parser": "^5.46.1",
"concurrently": "^7.6.0",
"eslint": "^8.30.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.24.1",
"eslint-plugin-n": "^15.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-simple-import-sort": "^8.0.0",
"eslint-plugin-sort-exports": "^0.8.0",
"eslint-plugin-sort-keys": "^2.3.5",
"eslint-plugin-typescript-sort-keys": "^2.1.0",
"eslint-plugin-unused-imports": "^2.0.0",
"prettier": "2.8.1",
"ts-node": "^10.9.1",
"tsc-alias": "^1.8.2",
"typescript": "^4.9.4"
},
"dependencies": {
"#lancejpollard/pretty-compact-json.js": "^0.2.0",
"chalk": "^5.2.0",
"glob": "^8.0.3",
"lodash": "^4.17.21",
"source-map": "^0.7.4"
}
}
Now I have rm -rf node_modules, and when I do npm install again, it shows the same error....

I had the same problem. Deleting the package-lock.json and the node_modules, and then running npm install solved my issue.
I hope it helps.

Related

Why is npm install installing a different version of a package than what's specified in package.json?

I am trying to set up a Gatsby project. The package.json file clearly wants react-drag-drop-files#2.3.5 but npm install is installing version 2.3.8, which is causing a dependency issue with react#18 and react#17. I am new to Node.js so I am not completely sure if that is the real issue.
The error log:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-drag-drop-files#2.3.8
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.1" from the root project
npm ERR! peer react#"^16.9.0 || ^17.0.0 || ^18.0.0 || ^0.0.0" from gatsby-link#4.24.1
npm ERR! node_modules/gatsby-link
npm ERR! gatsby-link#"^4.24.1" from gatsby#4.24.8
npm ERR! node_modules/gatsby
npm ERR! gatsby#"^4.6.0" from the root project
npm ERR! 12 more (babel-plugin-remove-graphql-queries, ...)
npm ERR! 30 more (gatsby, gatsby-plugin-image, gatsby-plugin-offline, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^18.0.0" from react-drag-drop-files#2.3.8
npm ERR! node_modules/react-drag-drop-files
npm ERR! react-drag-drop-files#"^2.3.5" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#18.2.0
npm ERR! node_modules/react
npm ERR! peer react#"^18.0.0" from react-drag-drop-files#2.3.8
npm ERR! node_modules/react-drag-drop-files
npm ERR! react-drag-drop-files#"^2.3.5" 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.
The package.json file:
"dependencies": {
"#emotion/react": "^11.7.1",
"#emotion/styled": "^11.6.0",
"#fluentui/react": "^8.51.1",
"#mui/icons-material": "^5.4.1",
"#mui/material": "^5.5.2",
"#mui/x-data-grid": "^5.7.0",
"axios": "^0.25.0",
"bootstrap-icons": "^1.7.2",
"cgview": "^1.2.0",
"gatsby": "^4.6.0",
"gatsby-plugin-gatsby-cloud": "^4.6.0",
"gatsby-plugin-image": "^2.6.0",
"gatsby-plugin-manifest": "^4.6.0",
"gatsby-plugin-offline": "^5.6.0",
"gatsby-plugin-react-helmet": "^5.6.0",
"gatsby-plugin-sharp": "^4.6.0",
"gatsby-source-filesystem": "^4.6.0",
"gatsby-transformer-sharp": "^4.6.0",
"prop-types": "^15.8.0",
"react": "^17.0.1",
"react-component-export-image": "^1.0.6",
"react-dom": "^17.0.1",
"react-drag-drop-files": "^2.3.5",
"react-helmet": "^6.1.0"
}

Unable to resolve module react-native-fs

I'm learning react native and building and app that use the camera and it works fine.
Now I'm trying to make image classification but I'm getting this error after installing:
#tensorflow/tfjs-react-native --legacy-peer-deps
I get this:
Unable to resolve module react-native-fs from
/Users/myuser/ALPR/node_modules/#tensorflow/tfjs-react-native/dist/bundle_resource_io.js:
react-native-fs could not be found within the project or in these
directories: node_modules
I don't know what should I do, I tried installing react-native-fs but I got this:
npm install react-native-fs npm ERR! code ERESOLVE npm ERR! ERESOLVE
could not resolve npm ERR! npm ERR! While resolving:
#tensorflow/tfjs-react-native#0.8.0 npm ERR! Found:
#tensorflow/tfjs-backend-cpu#3.19.0 npm ERR!
node_modules/#tensorflow/tfjs-backend-cpu npm ERR!
#tensorflow/tfjs-backend-cpu#"3.19.0" from #tensorflow/tfjs#3.19.0 npm
ERR! node_modules/#tensorflow/tfjs npm ERR!
#tensorflow/tfjs#"^3.19.0" from the root project npm ERR!
#tensorflow/tfjs-backend-cpu#"3.19.0" from
#tensorflow/tfjs-backend-webgl#3.19.0 npm ERR!
node_modules/#tensorflow/tfjs-backend-webgl npm ERR!
#tensorflow/tfjs-backend-webgl#"3.19.0" from #tensorflow/tfjs#3.19.0
npm ERR! node_modules/#tensorflow/tfjs npm ERR!
#tensorflow/tfjs#"^3.19.0" from the root project npm ERR! npm ERR!
Could not resolve dependency: npm ERR! peer
#tensorflow/tfjs-backend-cpu#"~3.11.0" from
#tensorflow/tfjs-react-native#0.8.0 npm ERR!
node_modules/#tensorflow/tfjs-react-native npm ERR!
#tensorflow/tfjs-react-native#"^0.8.0" from the root project npm ERR!
npm ERR! Conflicting peer dependency:
#tensorflow/tfjs-backend-cpu#3.11.0 npm ERR!
node_modules/#tensorflow/tfjs-backend-cpu npm ERR! peer
#tensorflow/tfjs-backend-cpu#"~3.11.0" from
#tensorflow/tfjs-react-native#0.8.0 npm ERR!
node_modules/#tensorflow/tfjs-react-native npm ERR!
#tensorflow/tfjs-react-native#"^0.8.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/macmac/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in: npm ERR!
/Users/macmac/.npm/_logs/2022-08-22T12_14_25_319Z-debug-0.log
I'm using this tutorial: https://www.bam.tech/article/how-to-recognize-real-time-object-in-reactnative-for-dummies
Hopefully somebody can help me with this.
Thanks
This is the package.json
{
"name": "alpr",
"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-native-async-storage/async-storage": "~1.17.3",
"#tensorflow/tfjs": "^3.19.0",
"#tensorflow/tfjs-react-native": "^0.8.0",
"expo": "~46.0.8",
"expo-camera": "~12.3.0",
"expo-gl": "~11.4.0",
"expo-gl-cpp": "~11.4.0",
"expo-media-library": "~14.2.0",
"expo-sharing": "~10.3.0",
"expo-status-bar": "~1.4.0",
"react": "18.0.0",
"react-native": "0.69.4"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
Finally I solved this by deleting the folder node_modules and then I used yarn install instead of npm.

Can't use npm install after I updated the version of all nestjs dependencies in my package.json

I have created a new nestjs project and installed several additional standard packages. In the console it said that the packages are outdated and there are 7 red vulnerabilities.
The suggested command npm audit fix --force did't help - there were still 4 red vulnerabilities after that.
I found a command that updates my packages to the latest versions:
npm install -g npm-check-updates
ncu -u
npm install
Now I can't use npm install:
npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #nestjs/typeorm#8.0.4
npm ERR! Found: typeorm#0.3.6
npm ERR! node_modules/typeorm
npm ERR! typeorm#"^0.3.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typeorm#"^0.2.34" from #nestjs/typeorm#8.0.4
npm ERR! node_modules/#nestjs/typeorm
npm ERR! #nestjs/typeorm#"^8.0.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: typeorm#0.2.45
npm ERR! node_modules/typeorm
npm ERR! peer typeorm#"^0.2.34" from #nestjs/typeorm#8.0.4
npm ERR! node_modules/#nestjs/typeorm
npm ERR! #nestjs/typeorm#"^8.0.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.
I deleted node_modules as well as the package-lock.json and then forced the installation with npm install --force. But I get again the message about severity vulnerabilities:
npm install --force
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nestjs/typeorm#8.0.4
npm WARN Found: typeorm#0.3.6
npm WARN node_modules/typeorm
npm WARN typeorm#"^0.3.6" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typeorm#"^0.2.34" from #nestjs/typeorm#8.0.4
npm WARN node_modules/#nestjs/typeorm
npm WARN #nestjs/typeorm#"^8.0.4" from the root project
npm WARN
npm WARN Conflicting peer dependency: typeorm#0.2.45
npm WARN node_modules/typeorm
npm WARN peer typeorm#"^0.2.34" from #nestjs/typeorm#8.0.4
npm WARN node_modules/#nestjs/typeorm
npm WARN #nestjs/typeorm#"^8.0.4" from the root project
added 823 packages, and audited 824 packages in 29s
84 packages are looking for funding
run `npm fund` for details
7 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
I am going in circles and do not understand how to solve the problem. And especially which version I need to use that has no red security issues?
My package.json file now looks like this:
{
"name": "api",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"#nestjs/common": "^8.4.5",
"#nestjs/core": "^8.4.5",
"#nestjs/platform-express": "^8.4.5",
"#nestjs/typeorm": "^8.0.4",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.5.5",
"sqlite3": "^5.0.8",
"typeorm": "^0.3.6"
},
"devDependencies": {
"#nestjs/cli": "^8.2.6",
"#nestjs/schematics": "^8.0.11",
"#nestjs/testing": "^8.4.5",
"#types/express": "^4.17.13",
"#types/jest": "27.5.1",
"#types/node": "^17.0.35",
"#types/supertest": "^2.0.12",
"#typescript-eslint/eslint-plugin": "^5.26.0",
"#typescript-eslint/parser": "^5.26.0",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^28.1.0",
"prettier": "^2.6.2",
"source-map-support": "^0.5.21",
"supertest": "^6.2.3",
"ts-jest": "^28.0.3",
"ts-loader": "^9.3.0",
"ts-node": "^10.8.0",
"tsconfig-paths": "^4.0.0",
"typescript": "^4.7.2"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
Why do I get an indication that I am using typeorm#"^0.2.34" even though my package.json file specifies a newer version "typeorm": "^0.3.6"? This is also the latest version at the moment.
PS: If I change the typorm version back to 0.2.34 or 0.2, I can use npm install again but I get the red "7 high severity vulnerabilities" message.
Same issue for me. Using npm install --legacy-peer-deps seems to fix the issue however vulnerabilities remains.
Hello I just got the some problem as yours it's because the nest and npm commands getting blocked so try to allow it from Windows PowerShell by following these steps here
update to the latest npm version by running this command
npm i -g npm#latest

vuejs 3 I deleted folder node_modules and now npm install has error

I have a work project, but I deleted folder node_modules and now npm install has error.
node v16.13.2
#vue/cli 4.5.15
my package.json
"dependencies": {
"#capacitor/android": "3.4.3",
"#capacitor/app": "1.1.0",
"#capacitor/core": "3.4.1",
"#capacitor/haptics": "1.1.4",
"#capacitor/keyboard": "1.2.2",
"#capacitor/status-bar": "1.0.8",
"#ionic/vue": "^6.0.9",
"#ionic/vue-router": "^6.0.0",
"#popperjs/core": "^2.11.2",
"axios": "^0.25.0",
"core-js": "^3.6.5",
"eslint-loader": "^4.0.2",
"vue": "^3.2.21",
"vue-axios": "^3.4.0",
"vue-router": "^4.0.12",
"vuex": "^4.0.2"
},
"devDependencies": {
"#babel/eslint-parser": "^7.17.0",
"#babel/eslint-plugin": "^7.16.5",
"#capacitor/cli": "3.4.1",
"#vue/cli-plugin-babel": "~4.5.15",
"#vue/cli-plugin-eslint": "~4.5.15",
"#vue/cli-service": "~4.5.15",
"#vue/compiler-sfc": "^3.0.0",
"eslint": "^7.0.0",
"eslint-plugin-vue": "^7.0.0"
},
npm install
# npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: dev.infi.loc#0.1.0
npm ERR! Found: eslint#7.32.0
npm ERR! node_modules/eslint
npm ERR! dev eslint#"^7.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint#">= 1.6.0 < 7.0.0" from #vue/cli-plugin-eslint#4.5.17
npm ERR! node_modules/#vue/cli-plugin-eslint
npm ERR! dev #vue/cli-plugin-eslint#"~4.5.15" 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\xxx\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\xxx\AppData\Local\npm-cache\_logs\2022-03-27T14_01_53_031Z-debug.log
How can I fix it? Please help. Thanks in advance.
Error screen https://i.stack.imgur.com/QmLtI.png
It happened to me a while ago, i dont know if the solutions is still going to work but, tried deleting the package.json then use npm init hen run dependency-check in your project directory followed by a npm install
A solution that worked for me was upgrading #vue/cli-plugin-eslint to ^5.0.4 (The ^ means "up to next major").
On a side note, you should keep all your packages as up-to-date as possible for security reasons.

npm update fails for Vue 2 project, created with vue-cli

I've created a Vue 2 project with vue-cli and tried to run npm update.
Unfortunately, I receive the following error:
{
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test-vue#0.1.0
npm ERR! Found: vue#2.6.12
npm ERR! node_modules/vue
npm ERR! vue#"~2.6.11" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue#"3.0.7" from #vue/compiler-sfc#3.0.7
npm ERR! node_modules/#vue/compiler-sfc
npm ERR! peerOptional #vue/compiler-sfc#"^3.0.0-beta.14" from #vue/cli-service#4.5.11
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"~4.5.0" from the root project
npm ERR! 1 more (#vue/cli-plugin-babel)
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!
My package.json looks like this:
{
"name": "test-vue",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"#turf/turf": "^6.3.0",
"bootstrap": "^4.5.3",
"core-js": "^3.6.5",
"leaflet": "^1.7.1",
"leaflet-geodesy": "^0.2.1",
"vue": "~2.6.11",
"vue-router": "~3.2.0"
},
"devDependencies": {
"#vue/cli-plugin-babel": "~4.5.0",
"#vue/cli-plugin-eslint": "~4.5.0",
"#vue/cli-plugin-router": "~4.5.0",
"#vue/cli-service": "~4.5.0",
"#vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^1.19.1",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vue-template-compiler": "~2.6.11"
}
}
I thought the ~ in the package.json should prevent from upgrading to Vue 3?
You help is appreciated!
EDIT: Tried as suggest with ncu -u
PS E:\projects\test-vue> ncu -u
Upgrading E:\projects\test-vue\package.json
[====================] 20/20 100%
core-js ^3.6.5 → ^3.9.1
vue ~2.6.11 → ~2.6.12
vue-router ~3.2.0 → ~3.5.1
#vue/cli-plugin-babel ~4.5.0 → ~4.5.11
#vue/cli-plugin-eslint ~4.5.0 → ~4.5.11
#vue/cli-plugin-router ~4.5.0 → ~4.5.11
#vue/cli-service ~4.5.0 → ~4.5.11
eslint ^6.7.2 → ^7.21.0
eslint-plugin-prettier ^3.1.3 → ^3.3.1
eslint-plugin-vue ^6.2.2 → ^7.7.0
prettier ^1.19.1 → ^2.2.1
sass ^1.26.5 → ^1.32.8
sass-loader ^8.0.2 → ^11.0.1
vue-template-compiler ~2.6.11 → ~2.6.12
Run npm install to install new versions.
PS E:\projects\test-vue> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: webpack#5.24.3
npm ERR! node_modules/webpack
npm ERR! peer webpack#"^4.0.0 || ^5.0.0" from #soda/friendly-errors-webpack-plugin#1.8.0
npm ERR! node_modules/#soda/friendly-errors-webpack-plugin
npm ERR! #soda/friendly-errors-webpack-plugin#"^1.7.1" from #vue/cli-service#4.5.11
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"~4.5.11" from the root project
npm ERR! 4 more (#vue/cli-plugin-babel, #vue/cli-plugin-eslint, ...)
npm ERR! peer webpack#">=4.0.0" from #vue/preload-webpack-plugin#1.1.2
npm ERR! node_modules/#vue/preload-webpack-plugin
npm ERR! #vue/preload-webpack-plugin#"^1.1.0" from #vue/cli-service#4.5.11
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"~4.5.11" from the root project
npm ERR! 4 more (#vue/cli-plugin-babel, #vue/cli-plugin-eslint, ...)
npm ERR! 8 more (babel-loader, copy-webpack-plugin, css-loader, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^4.0.0" from #intervolga/optimize-cssnano-plugin#1.0.6
npm ERR! node_modules/#intervolga/optimize-cssnano-plugin
npm ERR! #intervolga/optimize-cssnano-plugin#"^1.0.5" from #vue/cli-service#4.5.11
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"~4.5.11" from the root project
npm ERR! 4 more (#vue/cli-plugin-babel, #vue/cli-plugin-eslint, ...)
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\Admin\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\Admin\AppData\Local\npm-cache\_logs\2021-03-06T19_52_21_583Z-debug.log
maybe you can try to npm i -g npm-check-updates then in the root folder try to execute ncu -u this will update your dependencies, devDependencies and peerDependencies
There was an issue with some dependencies.
I finally worked this out by creating a new project with vue-cli and copying that package.json there.
Edit:
You have to make sure that you use compatible versions of all dependencies. - The best way to do this is to generate a project with vue-cli to get compatible versions.
Long story short: don't mess with the dependencies