Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eslint error on deployment on local server of react web app

Tags:

reactjs

There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

"eslint": "5.6.0"

Don't try to install it manually: your package manager does it automatically. However, a different version of eslint was detected higher up in the tree:

D:\chintu\blog-exambunker-master\blog-exambunker-master\node_modules\eslint (version: 5.6.1)

how to install the version 5.6.0 I am installing the eslint it always gets installed with the latest version, can someone suggest me what to do?

like image 512
abhinav pandey Avatar asked Oct 01 '18 07:10

abhinav pandey


People also ask

How do I get rid of Eslint errors in react project?

Basically, just delete . eslintrc and any other eslint config files(if any) from the project. Also, check your package. json and delete all eslint packages and do npm install on your project.


1 Answers

The error is an incompatibility between eslint and babel-eslint versions. To do solve this, firstly you need to remove your eslint package using npm uninstall eslint. This command will delete your eslint package. After this, you need to install the 5.6.0 version of eslint, so write this command npm i [email protected]. I hope that this will be helpful for you. Also, you can delete your node_modules folder and then install it.

like image 61
Nevzat Günay Avatar answered Oct 09 '22 23:10

Nevzat Günay