I'm trying to update my AWS Amplify app and I get this error, I have no idea what's wrong, everything works just fine locally. I've been trying to scan this log to see if I can understand anything from it but I cannot find what's wrong. It successfully builds the backend and fails when after the front-end prebuild. I tried redeploying previous successful deployments, but they all fail as well, which confused me even more. Here are the Logs:
`
2022-11-17T22:49:16.082Z [INFO]: ## Starting Frontend Build
# Starting phase: preBuild
2022-11-17T22:49:16.082Z [INFO]: # Executing command: npm ci
2022-11-17T22:49:20.209Z [WARNING]: npm
2022-11-17T22:49:20.211Z [WARNING]: WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #material-ui/core#3.9.3
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN react#"^17.0.2" from the root project
npm WARN 57 more (#coreui/icons-react, #coreui/react, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^16.3.0" from #material-ui/core#3.9.3
npm WARN node_modules/#material-ui/core
npm WARN peer #material-ui/core#"^3.2.0" from material-ui-pickers#2.2.4
npm WARN node_modules/material-ui-pickers
npm WARN 1 more (mdbreact)
npm WARN
npm WARN Conflicting peer dependency: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^16.3.0" from #material-ui/core#3.9.3
npm WARN node_modules/#material-ui/core
npm WARN peer #material-ui/core#"^3.2.0" from material-ui-pickers#2.2.4
npm WARN node_modules/material-ui-pickers
npm WARN 1 more (mdbreact)
2022-11-17T22:49:20.218Z [WARNING]: npm WARN
2022-11-17T22:49:20.218Z [WARNING]: ERESOLVE overriding peer dependency
npm WARN While resolving: #material-ui/core#3.9.3
npm WARN Found: react-dom#17.0.2
npm WARN node_modules/react-dom
npm WARN react-dom#"^17.0.2" from the root project
npm WARN 21 more (#coreui/react, #hookform/error-message, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom#"^16.3.0" from #material-ui/core#3.9.3
npm WARN node_modules/#material-ui/core
npm WARN peer #material-ui/core#"^3.2.0" from material-ui-pickers#2.2.4
npm WARN node_modules/material-ui-pickers
npm WARN 1 more (mdbreact)
npm WARN
npm WARN Conflicting peer dependency: react-dom#16.14.0
npm WARN node_modules/react-dom
npm WARN peer react-dom#"^16.3.0" from #material-ui/core#3.9.3
npm WARN node_modules/#material-ui/core
npm WARN peer #material-ui/core#"^3.2.0" from material-ui-pickers#2.2.4
npm WARN node_modules/material-ui-pickers
npm WARN 1 more (mdbreact)
2022-11-17T22:49:20.224Z [WARNING]: npm WARN ERESOLVE overriding peer dependency
2022-11-17T22:49:20.225Z [WARNING]: npm WARN While resolving: #material-ui/system#3.0.0-alpha.2
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN react#"^17.0.2" from the root project
npm WARN 57 more (#coreui/icons-react, #coreui/react, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^16.3.0" from #material-ui/system#3.0.0-alpha.2
npm WARN node_modules/#material-ui/system
npm WARN #material-ui/system#"^3.0.0-alpha.0" from #material-ui/core#3.9.3
npm WARN node_modules/#material-ui/core
npm WARN
npm WARN Conflicting peer dependency: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^16.3.0" from #material-ui/system#3.0.0-alpha.2
npm WARN node_modules/#material-ui/system
2022-11-17T22:49:20.225Z [WARNING]: npm WARN #material-ui/system#"^3.0.0-alpha.0" from #material-ui/core#3.9.3
npm WARN node_modules/#material-ui/core
2022-11-17T22:49:20.229Z [WARNING]: npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #material-ui/system#3.0.0-alpha.2
npm WARN Found: react-dom#17.0.2
2022-11-17T22:49:20.229Z [WARNING]: npm WARN node_modules/react-dom
npm WARN react-dom#"^17.0.2" from the root project
npm WARN 21 more (#coreui/react, #hookform/error-message, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom#"^16.3.0" from #material-ui/system#3.0.0-alpha.2
npm WARN node_modules/#material-ui/system
npm WARN #material-ui/system#"^3.0.0-alpha.0" from #material-ui/core#3.9.3
npm WARN node_modules/#material-ui/core
npm WARN
npm WARN Conflicting peer dependency: react-dom#16.14.0
npm WARN node_modules/react-dom
npm WARN peer react-dom#"^16.3.0" from #material-ui/system#3.0.0-alpha.2
npm WARN node_modules/#material-ui/system
npm WARN #material-ui/system#"^3.0.0-alpha.0" from #material-ui/core#3.9.3
npm
2022-11-17T22:49:20.229Z [WARNING]: WARN node_modules/#material-ui/core
2022-11-17T22:49:20.235Z [WARNING]: npm WARN
2022-11-17T22:49:20.235Z [WARNING]: ERESOLVE overriding peer dependency
npm WARN While resolving: #material-ui/utils#3.0.0-alpha.3
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN react#"^17.0.2" from the root project
npm WARN 57 more (#coreui/icons-react, #coreui/react, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^16.3.0" from #material-ui/utils#3.0.0-alpha.3
npm WARN node_modules/#material-ui/utils
npm WARN #material-ui/utils#"^3.0.0-alpha.2" from #material-ui/core#3.9.3
npm WARN node_modules/#material-ui/core
npm
2022-11-17T22:49:20.235Z [WARNING]: WARN
npm WARN Conflicting peer dependency: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^16.3.0" from #material-ui/utils#3.0.0-alpha.3
npm WARN node_modules/#material-ui/utils
npm WARN #material-ui/utils#"^3.0.0-alpha.2" from #material-ui/core#3.9.3
npm WARN node_modules/#material-ui/core
2022-11-17T22:49:20.240Z [WARNING]: npm WARN ERESOLVE
2022-11-17T22:49:20.240Z [WARNING]: overriding peer dependency
npm WARN While resolving: #material-ui/utils#3.0.0-alpha.3
npm WARN Found: react-dom#17.0.2
npm WARN node_modules/react-dom
npm WARN react-dom#"^17.0.2" from the root project
npm WARN 21 more (#coreui/react, #hookform/error-message, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom#"^16.3.0" from #material-ui/utils#3.0.0-alpha.3
npm WARN node_modules/#material-ui/utils
npm WARN #material-ui/utils#"^3.0.0-alpha.2" from #material-ui/core#3.9.3
npm WARN node_modules/#material-ui/core
npm WARN
npm WARN Conflicting peer dependency: react-dom#16.14.0
npm WARN node_modules/react-dom
npm WARN peer react-dom#"^16.3.0" from #material-ui/utils#3.0.0-alpha.3
npm WARN node_modules/#material-ui/utils
npm WARN #material-ui/utils#"^3.0.0-alpha.2" from #material-ui/core#3.9.3
npm
2022-11-17T22:49:20.240Z [WARNING]: WARN node_modules/#material-ui/core
2022-11-17T22:49:28.722Z [WARNING]: npm ERR! code ERESOLVE
2022-11-17T22:49:28.725Z [WARNING]: npm ERR!
2022-11-17T22:49:28.725Z [WARNING]: ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: aws-appsync#4.0.5
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR! peer react#"^17.0.1" from #coreui/icons-react#1.1.0
npm ERR! node_modules/#coreui/icons-react
npm ERR! #coreui/icons-react#"^1.1.0" from the root project
npm ERR! 56 more (#coreui/react, #coreui/react-chartjs, #emotion/react, ...)
npm ERR!
2022-11-17T22:49:28.725Z [WARNING]:
npm ERR! Could not resolve dependency:
npm ERR! peer #react-native-community/async-storage#"^1.11.0" from aws-appsync#4.0.5
npm ERR! node_modules/aws-appsync
npm ERR! aws-appsync#"^4.0.3" from the root project
npm ERR! peer aws-appsync#"3.x.x || 4.x.x" from aws-appsync-react#4.0.5
npm ERR! node_modules/aws-appsync-react
npm ERR! aws-appsync-react#"^4.0.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#16.14.0
npm ERR! node_modules/react
npm ERR! peer react#"^16.8" from #react-native-community/async-storage#1.12.1
npm ERR! node_modules/#react-native-community/async-storage
npm ERR! peer #react-native-community/async-storage#"^1.11.0" from aws-appsync#4.0.5
npm ERR! node_modules/aws-appsync
npm ERR! aws-appsync#"^4.0.3" from the root project
npm ERR! 1 more (aws-appsync-react)
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 /root/.npm/eresolve-report.txt for a full report.
2022-11-17T22:49:28.726Z [WARNING]: npm
2022-11-17T22:49:28.726Z [WARNING]: ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-11-17T22_49_16_301Z-debug-0.log
2022-11-17T22:49:28.737Z [ERROR]: !!! Build failed
2022-11-17T22:49:28.737Z [ERROR]: !!! Non-Zero Exit Code detected
2022-11-17T22:49:28.737Z [INFO]: # Starting environment caching...
2022-11-17T22:49:28.737Z [INFO]: # Uploading environment cache artifact...
2022-11-17T22:49:28.807Z [INFO]: # Uploaded environment cache artifact
2022-11-17T22:49:28.807Z [INFO]: # Environment caching completed
Terminating logging...
`
I tried redeploying previous successful builds, but that did help. I also tried changing the amplify.yaml file and adding --legacy-peer-deps to the end of the npm ci command and that also didn't solve the problem. I tried manually updating the libraries mentioned in the logs, that did't help either. I would really appreciate any suggestions in how to fix this. Thanks
I was trying to add a new feature to my web app, and what I was expecting was a successful build.
In order to run npm ci successfully with the --legacy-peer-deps flag, you should add a .npmrc file to your repository with the legacy peer dependencies enabled as below;
# ignore peerDependencies
legacy-peer-deps=true
It is important to add that your package-lock.json is equally required for the above to work as expected.
Related
I am on MacOS Ventura 13.1. I am using nvm 0.39.3 and I installed nvm install 16.19.0. I then create a fresh nuxt 2 project using this command npx create-nuxt-app testing_node. node -v is 16.19.0 and npm -v is 8.19.3.
Out of the box package json file
{
"name": "testing_node",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
},
"dependencies": {
"core-js": "^3.25.3",
"nuxt": "^2.15.8",
"vue": "^2.7.10",
"vue-server-renderer": "^2.7.10",
"vue-template-compiler": "^2.7.10"
},
"devDependencies": {}
When I run npm run dev I get this error right away without installing any other deps or making any configuration changes:
> testing_node#1.0.0 dev
> nuxt
╭───────────────────────────────────────╮
│ │
│ Nuxt # v2.16.1 │
│ │
│ ▸ Environment: development │
│ ▸ Rendering: server-side │
│ ▸ Target: server │
│ │
│ Listening: http://localhost:3000/ │
│ │
╰───────────────────────────────────────╯
ℹ Preparing project for development 10:35:26
ℹ Initial build may take a while 10:35:26
ℹ Discovered Components: .nuxt/components/readme.md 10:35:26
✔ Builder initialized 10:35:26
✔ Nuxt files generated 10:35:26
ERROR Cannot find module 'node-libs-browser' 10:35:26
Require stack:
- /Users/admin/testing_node/node_modules/webpack/lib/node/NodeSourcePlugin.js
- /Users/admin/testing_node/node_modules/webpack/lib/WebpackOptionsApply.js
- /Users/admin/testing_node/node_modules/webpack/lib/webpack.js
- /Users/admin/testing_node/node_modules/#nuxt/webpack/dist/webpack.js
- /Users/admin/testing_node/node_modules/#nuxt/builder/dist/builder.js
- /Users/admin/testing_node/index.js
Require stack:
- node_modules/webpack/lib/node/NodeSourcePlugin.js
- node_modules/webpack/lib/WebpackOptionsApply.js
- node_modules/webpack/lib/webpack.js
- node_modules/#nuxt/webpack/dist/webpack.js
- node_modules/#nuxt/builder/dist/builder.js
- index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Function.Module._load (node:internal/modules/cjs/loader:841:27)
at Module.require (node:internal/modules/cjs/loader:1067:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (node_modules/webpack/lib/node/NodeSourcePlugin.js:8:25)
at Module._compile (node:internal/modules/cjs/loader:1165:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
at Module.load (node:internal/modules/cjs/loader:1043:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1067:19)
Config options I chose when creating nuxt app:
create-nuxt-app v5.0.0
✨ Generating Nuxt.js project in testing_node
? Project name: testing_node
? Programming language: JavaScript
? Package manager: Npm
? UI framework: None
? Template engine: HTML
? Nuxt.js modules: (Press <space> to select, <a> to toggle all, <i> to invert selection)
? Linting tools: (Press <space> to select, <a> to toggle all, <i> to invert selection)
? Testing framework: None
? Rendering mode: Universal (SSR / SSG)
? Deployment target: Server (Node.js hosting)
? Development tools: (Press <space> to select, <a> to toggle all, <i> to invert selection)
The install after initialization finishes successfully but I do see all of these npm WARN's during install:
? Version control system: None
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/webpack#2.16.1
npm WARN Found: peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/webpack#2.16.1
npm WARN Found: peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/webpack#2.16.1
npm WARN Found: peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" from #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN node_modules/#nuxt/webpack/node_modules/#nuxt/friendly-errors-webpack-plugin
npm WARN #nuxt/friendly-errors-webpack-plugin#"^2.5.2" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/webpack#2.16.1
npm WARN Found: peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" from #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN node_modules/#nuxt/webpack/node_modules/#nuxt/friendly-errors-webpack-plugin
npm WARN #nuxt/friendly-errors-webpack-plugin#"^2.5.2" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/webpack#2.16.1
npm WARN Found: peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" from #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN node_modules/#nuxt/webpack/node_modules/#nuxt/friendly-errors-webpack-plugin
npm WARN #nuxt/friendly-errors-webpack-plugin#"^2.5.2" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Conflicting peer dependency: webpack#5.75.0
npm WARN node_modules/webpack
npm WARN peer webpack#"^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" from #nuxt/friendly-errors-webpack-plugin#2.5.
2
npm WARN node_modules/#nuxt/webpack/node_modules/#nuxt/friendly-errors-webpack-plugin
npm WARN #nuxt/friendly-errors-webpack-plugin#"^2.5.2" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: babel-loader#8.3.0
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#">=2" from babel-loader#8.3.0
npm WARN node_modules/#nuxt/webpack/node_modules/babel-loader
npm WARN babel-loader#"^8.3.0" from #nuxt/webpack#2.16.1
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/webpack#2.16.1
npm WARN Found: peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" from #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN node_modules/#nuxt/webpack/node_modules/#nuxt/friendly-errors-webpack-plugin
npm WARN #nuxt/friendly-errors-webpack-plugin#"^2.5.2" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Conflicting peer dependency: webpack#5.75.0
npm WARN node_modules/webpack
npm WARN peer webpack#"^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" from #nuxt/friendly-errors-webpack-plugin#2.5.
2
npm WARN node_modules/#nuxt/webpack/node_modules/#nuxt/friendly-errors-webpack-plugin
npm WARN #nuxt/friendly-errors-webpack-plugin#"^2.5.2" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: babel-loader#8.3.0
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#">=2" from babel-loader#8.3.0
npm WARN node_modules/#nuxt/webpack/node_modules/babel-loader
npm WARN babel-loader#"^8.3.0" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Conflicting peer dependency: webpack#5.75.0
npm WARN node_modules/webpack
npm WARN peer webpack#">=2" from babel-loader#8.3.0
npm WARN node_modules/#nuxt/webpack/node_modules/babel-loader
npm WARN babel-loader#"^8.3.0" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: cache-loader#4.1.0
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"^4.0.0" from cache-loader#4.1.0
npm WARN node_modules/#nuxt/webpack/node_modules/cache-loader
npm WARN cache-loader#"^4.1.0" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Conflicting peer dependency: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"^4.0.0" from cache-loader#4.1.0
npm WARN node_modules/#nuxt/webpack/node_modules/cache-loader
npm WARN cache-loader#"^4.1.0" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: css-loader#5.2.7
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"^4.27.0 || ^5.0.0" from css-loader#5.2.7
npm WARN node_modules/#nuxt/webpack/node_modules/css-loader
npm WARN css-loader#"^5.2.7" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN 1 more (vue-loader)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/webpack#2.16.1
npm WARN Found: peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" from #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN node_modules/#nuxt/webpack/node_modules/#nuxt/friendly-errors-webpack-plugin
npm WARN #nuxt/friendly-errors-webpack-plugin#"^2.5.2" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Conflicting peer dependency: webpack#5.75.0
npm WARN node_modules/webpack
npm WARN peer webpack#"^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" from #nuxt/friendly-errors-webpack-plugin#2.5.
2
npm WARN node_modules/#nuxt/webpack/node_modules/#nuxt/friendly-errors-webpack-plugin
npm WARN #nuxt/friendly-errors-webpack-plugin#"^2.5.2" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: babel-loader#8.3.0
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#">=2" from babel-loader#8.3.0
npm WARN node_modules/#nuxt/webpack/node_modules/babel-loader
npm WARN babel-loader#"^8.3.0" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Conflicting peer dependency: webpack#5.75.0
npm WARN node_modules/webpack
npm WARN peer webpack#">=2" from babel-loader#8.3.0
npm WARN node_modules/#nuxt/webpack/node_modules/babel-loader
npm WARN babel-loader#"^8.3.0" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: cache-loader#4.1.0
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"^4.0.0" from cache-loader#4.1.0
npm WARN node_modules/#nuxt/webpack/node_modules/cache-loader
npm WARN cache-loader#"^4.1.0" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Conflicting peer dependency: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"^4.0.0" from cache-loader#4.1.0
npm WARN node_modules/#nuxt/webpack/node_modules/cache-loader
npm WARN cache-loader#"^4.1.0" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: css-loader#5.2.7
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"^4.27.0 || ^5.0.0" from css-loader#5.2.7
npm WARN node_modules/#nuxt/webpack/node_modules/css-loader
npm WARN css-loader#"^5.2.7" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN 1 more (vue-loader)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/webpack#2.16.1
npm WARN Found: peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" from #nuxt/friendly-errors-webpack-plugin#2.5.2
npm WARN node_modules/#nuxt/webpack/node_modules/#nuxt/friendly-errors-webpack-plugin
npm WARN #nuxt/friendly-errors-webpack-plugin#"^2.5.2" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Conflicting peer dependency: webpack#5.75.0
npm WARN node_modules/webpack
npm WARN peer webpack#"^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" from #nuxt/friendly-errors-webpack-plugin#2.5.
2
npm WARN node_modules/#nuxt/webpack/node_modules/#nuxt/friendly-errors-webpack-plugin
npm WARN #nuxt/friendly-errors-webpack-plugin#"^2.5.2" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: babel-loader#8.3.0
npm WARN Found: webpack#undefined
npm WARN node_modules/webpack
npm WARN peer webpack#"*" from hard-source-webpack-plugin#0.13.1
npm WARN node_modules/#nuxt/webpack/node_modules/hard-source-webpack-plugin
npm WARN hard-source-webpack-plugin#"^0.13.1" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#">=2" from babel-loader#8.3.0
npm WARN node_modules/#nuxt/webpack/node_modules/babel-loader
npm WARN babel-loader#"^8.3.0" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN
npm WARN Conflicting peer dependency: webpack#5.75.0
npm WARN node_modules/webpack
npm WARN peer webpack#">=2" from babel-loader#8.3.0
npm WARN node_modules/#nuxt/webpack/node_modules/babel-loader
npm WARN babel-loader#"^8.3.0" from #nuxt/webpack#2.16.1
npm WARN node_modules/#nuxt/webpack
npm WARN ERESOLVE overriding peer dependency
...
And this goes on and on until it finally shows this:
🎉 Successfully created project testing_node
To get started:
cd testing_node
npm run dev
To build & start for production:
cd testing_node
npm run build
npm run start
From what I understand, nuxt 2 should work with node 16. I know I can downgrade to node 14 and make this work but my objective is to use node 16.
Also, I see that the error is a missing dependency but this should not be the case since it's a fresh install, this tells me that there is some sort of peer/sub dependency issue in one of the nuxt packages. I don't want to/not should I have to manually install missing sub dependencies into my root package.json just because a peer dep is missing them.
Why is this happening even with a fresh nuxt 2 project? Could this be machine specific?
After installing a newer version of node.js ( moving from node 14 to node 18), every time I want to install something in an older project, this list of errors pops up. I don't quite understand what it is related to and how to resolve the conflicts below.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #vue/compiler-sfc#3.1.5
npm WARN Found: vue#3.2.19
npm WARN node_modules/vue
npm WARN vue#"^3.1.5" from the root project
npm WARN 12 more (#vue/babel-preset-app, #vue/server-renderer, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer vue#"3.1.5" from #vue/compiler-sfc#3.1.5
npm WARN node_modules/#vue/compiler-sfc
npm WARN dev #vue/compiler-sfc#"^3.0.0" from the root project
npm WARN 1 more (#vue/cli-service)
npm WARN
npm WARN Conflicting peer dependency: vue#3.1.5
npm WARN node_modules/vue
npm WARN peer vue#"3.1.5" from #vue/compiler-sfc#3.1.5
npm WARN node_modules/#vue/compiler-sfc
npm WARN dev #vue/compiler-sfc#"^3.0.0" from the root project
npm WARN 1 more (#vue/cli-service)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #vue/composition-api#0.3.4
npm WARN Found: vue#3.2.19
npm WARN node_modules/vue
npm WARN vue#"^3.1.5" from the root project
npm WARN 12 more (#vue/babel-preset-app, #vue/server-renderer, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer vue#"^2.5.22" from #vue/composition-api#0.3.4
npm WARN node_modules/#vue/composition-api
npm WARN peer #vue/composition-api#"^0.3.2" from vue-use-web#1.0.1
npm WARN node_modules/vue-use-web
npm WARN
npm WARN Conflicting peer dependency: vue#2.7.14
npm WARN node_modules/vue
npm WARN peer vue#"^2.5.22" from #vue/composition-api#0.3.4
npm WARN node_modules/#vue/composition-api
npm WARN peer #vue/composition-api#"^0.3.2" from vue-use-web#1.0.1
npm WARN node_modules/vue-use-web
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #vueup/vue-quill#1.0.0-beta.8
npm WARN Found: vue#3.2.19
npm WARN node_modules/vue
npm WARN vue#"^3.1.5" from the root project
npm WARN 12 more (#vue/babel-preset-app, #vue/server-renderer, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer vue#"^3.2.31" from #vueup/vue-quill#1.0.0-beta.8
npm WARN node_modules/#vueup/vue-quill
npm WARN #vueup/vue-quill#"^1.0.0-beta.8" from the root project
npm WARN
npm WARN Conflicting peer dependency: vue#3.2.47
npm WARN node_modules/vue
npm WARN peer vue#"^3.2.31" from #vueup/vue-quill#1.0.0-beta.8
npm WARN node_modules/#vueup/vue-quill
npm WARN #vueup/vue-quill#"^1.0.0-beta.8" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: primevue#3.12.5
npm WARN Found: primeicons#4.1.0
npm WARN node_modules/primeicons
npm WARN primeicons#"^4.1.0" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer primeicons#"^5.0.0" from primevue#3.12.5
npm WARN node_modules/primevue
npm WARN primevue#"^3.12.5" from the root project
npm WARN
npm WARN Conflicting peer dependency: primeicons#5.0.0
npm WARN node_modules/primeicons
npm WARN peer primeicons#"^5.0.0" from primevue#3.12.5
npm WARN node_modules/primevue
npm WARN primevue#"^3.12.5" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: sass-loader#12.1.0
npm WARN Found: webpack#4.46.0
npm WARN node_modules/webpack
npm WARN peer webpack#"^4.0.0" from #intervolga/optimize-cssnano-plugin#1.0.6
npm WARN node_modules/#intervolga/optimize-cssnano-plugin
npm WARN #intervolga/optimize-cssnano-plugin#"^1.0.5" from #vue/cli-service#4.5.13
npm WARN node_modules/#vue/cli-service
npm WARN 19 more (#soda/friendly-errors-webpack-plugin, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack#"^5.0.0" from sass-loader#12.1.0
npm WARN node_modules/sass-loader
npm WARN sass-loader#"^12.1.0" from the root project
npm WARN
npm WARN Conflicting peer dependency: webpack#5.75.0
npm WARN node_modules/webpack
npm WARN peer webpack#"^5.0.0" from sass-loader#12.1.0
npm WARN node_modules/sass-loader
npm WARN sass-loader#"^12.1.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: vue-clickaway#2.2.2
npm WARN Found: vue#3.2.19
npm WARN node_modules/vue
npm WARN vue#"^3.1.5" from the root project
npm WARN 12 more (#vue/babel-preset-app, #vue/server-renderer, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer vue#"^2.0.0" from vue-clickaway#2.2.2
npm WARN node_modules/vue-clickaway
npm WARN vue-clickaway#"^2.2.2" from vue-context#6.0.0
npm WARN node_modules/vue-context
npm WARN
npm WARN Conflicting peer dependency: vue#2.7.14
npm WARN node_modules/vue
npm WARN peer vue#"^2.0.0" from vue-clickaway#2.2.2
npm WARN node_modules/vue-clickaway
npm WARN vue-clickaway#"^2.2.2" from vue-context#6.0.0
npm WARN node_modules/vue-context
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: vue-demi#0.11.4
npm WARN Found: #vue/composition-api#0.3.4
npm WARN node_modules/#vue/composition-api
npm WARN peer #vue/composition-api#"^0.3.2" from vue-use-web#1.0.1
npm WARN node_modules/vue-use-web
npm WARN vue-use-web#"^1.0.1" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional #vue/composition-api#"^1.0.0-rc.1" from vue-demi#0.11.4
npm WARN node_modules/vue-demi
npm WARN vue-demi#"*" from #vueuse/core#5.3.0
npm WARN node_modules/#vueuse/core
npm WARN 2 more (#vueuse/integrations, #vueuse/shared)
npm WARN
npm WARN Conflicting peer dependency: #vue/composition-api#1.7.1
npm WARN node_modules/#vue/composition-api
npm WARN peerOptional #vue/composition-api#"^1.0.0-rc.1" from vue-demi#0.11.4
npm WARN node_modules/vue-demi
npm WARN vue-demi#"*" from #vueuse/core#5.3.0
npm WARN node_modules/#vueuse/core
npm WARN 2 more (#vueuse/integrations, #vueuse/shared)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: vue-js-modal#2.0.1
npm WARN Found: vue#3.2.19
npm WARN node_modules/vue
npm WARN vue#"^3.1.5" from the root project
npm WARN 12 more (#vue/babel-preset-app, #vue/server-renderer, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer vue#"^2.6.11" from vue-js-modal#2.0.1
npm WARN node_modules/vue-js-modal
npm WARN vue-js-modal#"^2.0.1" from the root project
npm WARN
npm WARN Conflicting peer dependency: vue#2.7.14
npm WARN node_modules/vue
npm WARN peer vue#"^2.6.11" from vue-js-modal#2.0.1
npm WARN node_modules/vue-js-modal
npm WARN vue-js-modal#"^2.0.1" from the root project
As far as I can see, a version-related error pops up for most of the modules I have installed. On the node 14 version everything works.
These warnings indicate conflicts between different versions of packages that are installed in your project. These conflicts occur when a package has a peer dependency on a specific version of another package, but there is already a different version of that package installed in your project.
To resolve these conflicts, you can try updating or downgrading the version of the conflicting package or installing the missing peer dependency directly in your project. You can also try deleting the node_modules folder and running npm install to install all packages again from scratch.
node 14.*.* uses npm 6.*.* version
node 18.*.* uses npm 8.*.* version
https://nodejs.org/en/download/releases/
Resolving dependenies works differently. You can find out more on npm config page: https://docs.npmjs.com/cli/v7/using-npm/config
or use flag legacy-peer-deps but it's not recommended, as it will not enforce the peerDependencies contract that meta-dependencies may rely on
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-data-grid#5.0.5
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN react#"^17.0.2" from the root project
npm WARN 40 more (#emotion/react, #material-ui/core, #material-ui/icons, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^15.0.0 || ^16.0.0" from react-data-grid#5.0.5
npm WARN node_modules/react-data-grid
npm WARN react-data-grid#"^5.0.5" from react-file-viewer#1.2.1
npm WARN node_modules/react-file-viewer
npm WARN
npm WARN Conflicting peer dependency: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^15.0.0 || ^16.0.0" from react-data-grid#5.0.5
npm WARN node_modules/react-data-grid
npm WARN react-data-grid#"^5.0.5" from react-file-viewer#1.2.1
npm WARN node_modules/react-file-viewer
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-data-grid#5.0.5
npm WARN Found: react-dom#17.0.2
npm WARN node_modules/react-dom
npm WARN react-dom#"^17.0.2" from the root project
npm WARN 21 more (#material-ui/core, #material-ui/icons, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom#"^15.0.0 || ^16.0.0" from react-data-grid#5.0.5
npm WARN node_modules/react-data-grid
npm WARN react-data-grid#"^5.0.5" from react-file-viewer#1.2.1
npm WARN node_modules/react-file-viewer
npm WARN
npm WARN Conflicting peer dependency: react-dom#16.14.0
npm WARN node_modules/react-dom
npm WARN peer react-dom#"^15.0.0 || ^16.0.0" from react-data-grid#5.0.5
npm WARN node_modules/react-data-grid
npm WARN react-data-grid#"^5.0.5" from react-file-viewer#1.2.1
npm WARN node_modules/react-file-viewer
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-draft-wysiwyg-a#1.14.5-1
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR! peer react#">=16.8.0" from #emotion/react#11.8.2
npm ERR! node_modules/#emotion/react
npm ERR! #emotion/react#"^11.1.1" from react-select#5.2.2
npm ERR! node_modules/react-select
npm ERR! react-select#"^5.2.2" from the root project
npm ERR! 39 more (#material-ui/core, #material-ui/icons, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x" from react-draft-wysiwyg-a#1.14.5-1
npm ERR! node_modules/react-draft-wysiwyg-a
npm ERR! react-draft-wysiwyg-a#"^1.14.5-1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#16.14.0
npm ERR! node_modules/react
npm ERR! peer react#"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x" from react-draft-wysiwyg-a#1.14.5-1
npm ERR! node_modules/react-draft-wysiwyg-a
npm ERR! react-draft-wysiwyg-a#"^1.14.5-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\buddh\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\buddh\AppData\Local\npm-cache\_logs\2022-08-16T04_30_17_480Z-debug-0.log
I've been working on my react project and am unable to update or install new packages without my computer making a ton of noise. I know it has something to do with the versions of react-dom and react-router-dom but I am not sure the best way to fix it. I just don't want to screw anything up further. Any help or guidance is appreciated!
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: my-app#0.1.0
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN peer react#"*" from #testing-library/react#11.2.7
npm WARN node_modules/#testing-library/react
npm WARN #testing-library/react#"^11.2.2" from the root project
npm WARN 5 more (mini-create-react-context, react-dom, react-router, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"17.0.2" from react-dom#17.0.2
npm WARN node_modules/react-dom
npm WARN peer react-dom#"*" from #testing-library/react#11.2.7
npm WARN node_modules/#testing-library/react
npm WARN 1 more (the root project)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: my-app#0.1.0
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN peer react#"*" from #testing-library/react#11.2.7
npm WARN node_modules/#testing-library/react
npm WARN #testing-library/react#"^11.2.2" from the root project
npm WARN 5 more (mini-create-react-context, react-dom, react-router, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#">=15" from react-router-dom#5.3.0
npm WARN node_modules/react-router-dom
npm WARN react-router-dom#"^5.2.0" from the root project
These errors popped up after deleting node_modules and package-lock.json.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-app#0.1.0
npm ERR! Found: react#undefined
npm ERR! node_modules/react
npm ERR! react#"^17.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#">=15" from react-router-dom#5.3.0
npm ERR! node_modules/react-router-dom
npm ERR! react-router-dom#"^5.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 /Users/cherie/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
To update all packages to a new major version, install the npm-check-updates package globally:
npm install -g npm-check-updates
then run it:
ncu -u
this will upgrade all the version hints in the package.json file, to dependencies and devDependencies, so npm can install the new major version.
then run this :
npm update
The project has been setup using an older version of NodeJS and NPM, the package manager, so it was more lax about dependencies than the current version. When working with older projects, you can use a CLI flag:
npm install --legacy-peer-deps
Just like the error actually tells you. If that is not enough, and the project is just bad as far as dependencies go, you can also use the other flag it's proposing:
npm install --force
Both of those flags relax the dependency resolution checks to work more like older version of the package manager.
This way, you can at least install the project and then you can spent some time on maintenance to fix the issues with mismatched dependency versions and ranges.
When I type
npx create-next-app
It will ask me to give a name of directory right? So, I type the name I want and then let it run. But it keep stay still at these line.
And then in the previous time when I do 'create-next-app'. I do in with
npm create-next-app job --use-nom
or
yarn create next-app job
It still got error.
And when I try npm audit fix --force
It keep showing these error.
_________________________________________________________________________________________
npm WARN using --force Recommended protections disabled.
npm WARN audit Updating next to 9.4.4,which is a SemVer major change.
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react#17.0.1
npm WARN node_modules/react
npm WARN peer react#"17.0.1" from react-dom#17.0.1
npm WARN node_modules/react-dom
npm WARN react-dom#"17.0.1" from the root project
npm WARN 1 more (the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^16.6.0" from next#9.4.4
npm WARN node_modules/next
npm WARN next#"9.4.4" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react-dom#17.0.1
npm WARN node_modules/react-dom
npm WARN react-dom#"17.0.1" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom#"^16.6.0" from next#9.4.4
npm WARN node_modules/next
npm WARN next#"9.4.4" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react#17.0.1
npm WARN node_modules/react
npm WARN peer react#"17.0.1" from react-dom#17.0.1
npm WARN node_modules/react-dom
npm WARN react-dom#"17.0.1" from the root project
npm WARN 1 more (the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^16.9.0" from #next/react-dev-overlay#9.4.4
npm WARN node_modules/next/node_modules/#next/react-dev-overlay
npm WARN #next/react-dev-overlay#"9.4.4" from next#9.4.4
npm WARN node_modules/next
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react#17.0.1
npm WARN node_modules/react
npm WARN peer react#"17.0.1" from react-dom#17.0.1
npm WARN node_modules/react-dom
npm WARN react-dom#"17.0.1" from the root project
npm WARN 1 more (the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^16.9.0" from #next/react-dev-overlay#9.4.4
npm WARN node_modules/next/node_modules/#next/react-dev-overlay
npm WARN #next/react-dev-overlay#"9.4.4" from next#9.4.4
npm WARN node_modules/next
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react-dom#17.0.1
npm WARN node_modules/react-dom
npm WARN react-dom#"17.0.1" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom#"^16.9.0" from #next/react-dev-overlay#9.4.4
npm WARN node_modules/next/node_modules/#next/react-dev-overlay
npm WARN #next/react-dev-overlay#"9.4.4" from next#9.4.4
npm WARN node_modules/next
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react-dom#17.0.1
npm WARN node_modules/react-dom
npm WARN react-dom#"17.0.1" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom#"^16.9.0" from #next/react-dev-overlay#9.4.4
npm WARN node_modules/next/node_modules/#next/react-dev-overlay
npm WARN #next/react-dev-overlay#"9.4.4" from next#9.4.4
npm WARN node_modules/next
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react#17.0.1
npm WARN node_modules/react
npm WARN peer react#"17.0.1" from react-dom#17.0.1
npm WARN node_modules/react-dom
npm WARN react-dom#"17.0.1" from the root project
npm WARN 1 more (the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"15.x.x || 16.x.x" from styled-jsx#3.3.0
npm WARN node_modules/next/node_modules/styled-jsx
npm WARN styled-jsx#"3.3.0" from next#9.4.4
npm WARN node_modules/next
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react#17.0.1
npm WARN node_modules/react
npm WARN peer react#"17.0.1" from react-dom#17.0.1
npm WARN node_modules/react-dom
npm WARN react-dom#"17.0.1" from the root project
npm WARN 1 more (the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"15.x.x || 16.x.x" from styled-jsx#3.3.0
npm WARN node_modules/next/node_modules/styled-jsx
npm WARN styled-jsx#"3.3.0" from next#9.4.4
npm WARN node_modules/next
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react#17.0.1
npm WARN node_modules/react
npm WARN peer react#"17.0.1" from react-dom#17.0.1
npm WARN node_modules/react-dom
npm WARN react-dom#"17.0.1" from the root project
npm WARN 1 more (the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^16.8.0" from use-subscription#1.4.1
npm WARN node_modules/next/node_modules/use-subscription
npm WARN use-subscription#"1.4.1" from next#9.4.4
npm WARN node_modules/next
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react#17.0.1
npm WARN node_modules/react
npm WARN peer react#"17.0.1" from react-dom#17.0.1
npm WARN node_modules/react-dom
npm WARN react-dom#"17.0.1" from the root project
npm WARN 1 more (the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^16.8.0" from use-subscription#1.4.1
npm WARN node_modules/next/node_modules/use-subscription
npm WARN use-subscription#"1.4.1" from next#9.4.4
npm WARN node_modules/next
npm WARN deprecated mkdirp#0.5.3: Legacy versions of mkdirp are no longer supported. Please update to
mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated fsevents#2.1.3: Please update to v 2.2.x
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure
binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm ERR! code 1
npm ERR! path C:\Users\Faijiuy\Desktop\University Classes_Materials\Senior Project 1\Test Next-
js\job\node_modules\#ampproject\toolbox-optimizer
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node lib/warmup.js
npm ERR! internal/modules/cjs/loader.js:613
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'cross-fetch'
npm ERR! Require stack:
npm ERR! - C:\Users\Faijiuy\Desktop\University Classes_Materials\Senior Project 1\Test Next-js\job\node_modules\#ampproject\toolbox-optimizer\lib\DomTransformer.js
npm ERR! - C:\Users\Faijiuy\Desktop\University Classes_Materials\Senior Project 1\Test Next-js\job\node_modules\#ampproject\toolbox-optimizer\index.js
npm ERR! - C:\Users\Faijiuy\Desktop\University Classes_Materials\Senior Project 1\Test Next-js\job\node_modules\#ampproject\toolbox-optimizer\lib\warmup.js
npm ERR! at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
npm ERR! at Function.Module._load (internal/modules/cjs/loader.js:526:27)
npm ERR! at Module.require (internal/modules/cjs/loader.js:666:19)
npm ERR! at require (internal/modules/cjs/helpers.js:16:16)
npm ERR! at Object.<anonymous> (C:\Users\Faijiuy\Desktop\University Classes_Materials\Senior Project 1\Test Next-js\job\node_modules\#ampproject\toolbox-optimizer\lib\DomTransformer.js:20:13)
npm ERR! at Module._compile (internal/modules/cjs/loader.js:759:30)
npm ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
npm ERR! at Module.load (internal/modules/cjs/loader.js:628:32)
npm ERR! at Function.Module._load (internal/modules/cjs/loader.js:555:12)
npm ERR! at Module.require (internal/modules/cjs/loader.js:666:19)
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Faijiuy\AppData\Local\npm-cache\_logs\2020-12-21T17_49_46_033Z-debug.log
________________________________________________________________________________________________________
And, some other previous time. I also have try using yarn to do it.
But every time I do it the files keep missing or the command 'next' cannot be used internal/external. Even there are script tag show up in `package.json`, I cannot run yarn dev because `next` command is not recognized on internal/external
Sometime there problem like `chovidar, fesevent` cannot be use like
- Sometime, it ask to install next-app
- Sometimes, they will ask to update fesevents, but I do not know how?
npm WARN deprecated fsevents#2.1.3: Please update to v 2.2.x
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
I also try uninstall Node.js and install and old version of Node.js
Current version: 12.0.0
Old test previous version of Node.js: 15.4.0
I have tried every possible ways. How I can fix this problem? Do I need to install a new Node.js?
Could update your nextjs version to 9.5.0 in your package.json. There is a yet unfixed dependency issue with cross-fetch on 9.4.4. Your current nextjs version shows 9.4.4.
That should fix the problem