When I run npm run watch I get this message Do you want to install 'webpack-cli' (yes/no):
I type y then I get an error indicating a conflict of eslint versions
npm ERR! Found: eslint#4.19.1
npm ERR! node_modules/eslint
npm ERR! dev eslint#"^4.19.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint#"^5.0.0" from eslint-plugin-vue#5.2.3
npm ERR! node_modules/eslint-plugin-vue
npm ERR! dev eslint-plugin-vue#"^5.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.
npm ERR!
PS: I don't prefer to use npm install --legacy-peer-dep as workaround to ignore peer deps and proceed with the installation anyway, yet I need to delete it definitively
is there a way to completly remove the old version so I won't get any troubles ?
Related
i can't install swagger in my nestjs application. When I try, I get a Error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test.api#0.0.1
npm ERR! Found: #nestjs/common#8.4.7
npm ERR! node_modules/#nestjs/common
npm ERR! #nestjs/common#"^8.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #nestjs/common#"^9.0.0" from #nestjs/swagger#6.0.1
npm ERR! node_modules/#nestjs/swagger
npm ERR! dev #nestjs/swagger#"*" 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\Jakub\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\Jakub\AppData\Local\npm- cache\_logs\2022-07-10T11_03_48_876Z-debug-0.log
How to resolve this?
NestJS 9 was recently released (2 days ago).
https://trilon.io/blog/nestjs-9-is-now-available.
Changes have been made to the #nestjs/swagger package. You are installing the latest version which has peer dependencies on NestJS 9 while your project is still on version 8.4.7.
The error is saying it cannot resolve the requested peer dependency #nestjs/common#^9.0.0. It does find #nestjs/common#8.4.7 instead, but that's not compatible.
Either upgrade NestJS or install an older version of the #nestjs/swagger package that is compatible with the NestJS version your application uses. Version 5.2.1 should work for you.
yarn add #nestjs/swagger#5.2.1
OR
npm i #nestjs/swagger#5.2.1
I just cloned a React application from Git that doesn't have node_modules on it. I try to install with command npm install but unable to do it. Following error occurs when installing the npm.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: fuse-react-app#2.0.0
npm ERR! Found: date-fns#2.0.0-alpha.26
npm ERR! node_modules/date-fns
npm ERR! date-fns#"2.0.0-alpha.26" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer date-fns#"2.0.0-alpha.21" from #date-io/date-fns#1.0.1
npm ERR! node_modules/#date-io/date-fns
npm ERR! #date-io/date-fns#"1.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! See C:\Users\...\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\...\AppData\Local\npm-cache\_logs\2022-04-24T12_44_19_589Z-debug-0.log
I even tried with npm install --legacy-peer-deps but doesn't work. How can I fix this issue?
TL;DR
A possible solution to this problem is setting the version of date-fns to 2.0.0-alpha.21.
Full Answer
To fix your issue, you can change the version of date-fns.
To do this, follow these steps.
In package.json, edit the version of date-fns with the following:
{
"dependencies": {
"date-fns": "2.0.0-alpha.21"
}
}
Save the package.json file, and run the following command in the same directory as package.json.
$ npm install
Your dependencies should install successfully.
Conclusion
In conclusion, you need to change the version of date-fns to 2.0.0-alpha.21.
I have been trying to download a template to start customizing it. Upon downloading it, one is supposed to install all local dependencies using npm install or yarn install. I have done both of those and I have gotten the same error both times. Moreover I have tried using the same command with --force and --legacy-peer-deps, as advised in the error message. I found a GitHub issue discussing this precise problem and some other stack overflow threads. I have tried everything I have come across, and it is just not working. Moreover I have installed the recommended version of node, so that is not the problem either, as suggested in a different thread.
The error message can be seen below.
While resolving: #mui/material#5.2.0
npm ERR! Found: #emotion/react#11.4.1
npm ERR! node_modules/#emotion/react
npm ERR! #emotion/react#"11.4.1" from the root project
npm ERR! peer #emotion/react#"^11.0.0-rc.0" from #emotion/styled#11.3.0
npm ERR! node_modules/#emotion/styled
npm ERR! #emotion/styled#"11.3.0" from the root project
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.2.0
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"5.2.0" from the root project
npm ERR! 1 more (#mui/icons-material)
npm ERR! 1 more (#mui/styled-engine)
npm ERR! 1 more (#mui/styled-engine)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional #emotion/react#"^11.5.0" from #mui/material#5.2.0
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"5.2.0" from the root project
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.2.0
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"5.2.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #emotion/react#11.7.1
npm ERR! node_modules/#emotion/react
npm ERR! peerOptional #emotion/react#"^11.5.0" from #mui/material#5.2.0
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"5.2.0" from the root project
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.2.0
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"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.
The template: https://www.creative-tim.com/product/material-dashboard-react?ref=readme-mdr#
GitHub issue: https://github.com/creativetimofficial/material-dashboard-react/issues/171
Thanks in advance.
The problem is that the specific version of #emotion/react used in the template, is not working anymore.
To solve the problem I went to the package.json and changed the version from 11.4.1 to 11.5.0 manually. Seems that the 11.5.0 solves the problem with the template used.
upgrade your version from package.json file and run again "npm install" command
I received this error while not in the folder of my react app. Cd into it and should be good but I am positive you found this answer by now or stumbled upon it like me. Best wishes
In React Native application to make a navigation need to install #react-navigation/stack using npm install #react-navigation/stack and I have tried it and failed each and every times.
NPM version: 7.19.1
Node version: v15.14.0
Expo version: 4.8.1
After running npm install #react-navigation/stack this command I have faced the below error is given,
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined#undefined
npm ERR! Found: #react-navigation/native#3.8.4
npm ERR! node_modules/#react-navigation/native
npm ERR! #react-navigation/native#"^3.8.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #react-navigation/native#"^6.0.0" from #react-navigation/stack#6.0.1
npm ERR! node_modules/#react-navigation/stack
npm ERR! #react-navigation/stack#"*" 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/imdadul/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/imdadul/.npm/_logs/2021-08-04T07_46_39_555Z-debug.log
Note: Please concern the attached file and who have knowledge about this will be helpful to help me. Advanced Thanks!
You have dependency conflict which means that the dependency is incorrect and potentially broken. You could try to run the command with --force, or --legacy-peer-deps and see if that helps.
npm install #react-navigation/stack --force
or
npm install #react-navigation/stack --legacy-peer-deps
Sometimes removing the node_modules and package-lock.json file and run the command npm install #react-navigation/stack or try npm cache clean --force can work.
I am trying to install ng bootstrap on an angular project. But when I do, I get the following error:
An unhandled exception occurred: npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test#0.0.0
npm ERR! Found: #angular/compiler#10.1.6
npm ERR! node_modules/#angular/compiler
npm ERR! #angular/compiler#"~10.1.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/compiler#"10.2.4" from #angular/localize#10.2.4
npm ERR! node_modules/#angular/localize
npm ERR! peer #angular/localize#"^10.0.0" from #ng-bootstrap/ng-bootstrap#8.0.4
npm ERR! node_modules/#ng-bootstrap/ng-bootstrap
npm ERR! #ng-bootstrap/ng-bootstrap#"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.
But on another project, the installation went well. Can someone explain to me how to fix this problem?
I was able to solve the problem. I put my solution in case someone has the same problem.
I first updated angular core with ng update #angular/cli #angular/core.
Since I had ng-starrating installed, I uninstalled it with npm uninstall ng-starrating.
And finally I added ng-bootstrap with ng add # ng-bootstrap / ng-bootstrap. And everything is going well.