简体   繁体   中英

Why is eslint version 5.6.0 throwing an error while running build?

the react-scripts package provided by create react app requires a dependency eslint ^5.6.0. it says that another version was detected higher up in the tree (version: 8.30.0) the latest I've installed. If I install the 5.6 version I get other errors instead of fixing it.

I've also tried the SKIP_PREFLIGHT in a.env file with no success. As well as the troubleshooting from the terminal (removedd the node module folder and npm install again).

Here are some of the things I've tried

craco: cannot find eslint loader (eslint-loader) - lastest error showing up

reintalled eslint (lastest version) installed eslint different versions to match with the ones in the file Reinstalled google-auth-library

troubleshooting from terminal (React Suggestions): - Removed node_modules from user and ran npm install (install all node modules again) - Added the SKIP_PREFLIGHT.env - Under Package.json removed and added again the eslintConfig / changed "eslint": "8.31" to recommended one (version 7) - Deleted package-lock (added back after no success) - devDependencies Removed ESLint (added back after no success) - npm audit

From StackOverflow: - Added to craco eslint: { enable: false}, - Updated npm - Changed craco version to 6.4 - npm install -D eslint to install in the devDependecy - Added module: rules on craco - downgraded to npm install webpack@5.75.0

New error messages: craco cannot find ESLint loader (eslint-loader) - eslint-loader is deprecated, tried installing eslint-webpack-plugin.. same problem

Any ideas about what might be happening?

I had multiple versions of eslint - the problem went away when I updated to version 8 (updating the manifest as well)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM