I don't know how, but the following error has been appearing on starting my app from npm start
and is preventing me from building the project with npm run build
. I have researched a lot and tried many methods but still have no luck in getting rid of this error. I have tried installing the previous version of the related packages appearing in the error, and I also deleted the node_modules
folder and re-installed the packages with npm install
but still no luck. So yeah I can't understand the error but need help resolving this.
Error Message:
Failed to load plugin '@typescript-eslint' declared in 'package.json » eslint-config-react-app#overrides[0]': Cannot find module 'eslint/use-at-your-own-risk'
Require stack:
- C:\Users\amand\Documents\_My Files\app\frontend_react\node_modules\@typescript-eslint\eslint-plugin\dist\util\getESLintCoreRule.js
- C:\Users\amand\Documents\_My Files\app\frontend_react\node_modules\@typescript-eslint\eslint-plugin\dist\rules\brace-style.js
- C:\Users\amand\Documents\_My Files\app\frontend_react\node_modules\@typescript-eslint\eslint-plugin\dist\rules\index.js
- C:\Users\amand\Documents\_My Files\app\frontend_react\node_modules\@typescript-eslint\eslint-plugin\dist\index.js
- C:\Users\amand\Documents\_My Files\app\frontend_react\node_modules\@eslint\eslintrc\dist\eslintrc.cjs
package.json:
{
"name": "appname",
"version": "0.1.0",
"homepage": ".",
"private": true,
"dependencies": {
"@horat1us/detect-ad-block": "^1.0.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.1.1",
"@testing-library/user-event": "^14.1.1",
"@types/cookie": "^0.5.1",
"@types/jest": "^27.4.1",
"@types/js-cookie": "^3.0.2",
"@types/node": "^17.0.25",
"@types/react-router-dom": "^5.3.3",
"@types/react-scroll": "^1.8.3",
"@types/swiper": "^5.4.3",
"axios": "^0.26.1",
"bootstrap": "^5.1.3",
"jquery": "^3.6.0",
"js-cookie": "^3.0.1",
"react": "^18.0.0",
"react-app-polyfill": "^3.0.0",
"react-bootstrap": "^2.3.0",
"react-device-detect": "^2.2.2",
"react-dom": "^18.0.0",
"react-intersection-observer": "^9.0.0",
"react-request-fullscreen": "^1.1.2",
"react-router-dom": "^6.3.0",
"react-scripts": "^5.0.1",
"react-scroll": "^1.8.7",
"swiper": "^8.1.3"
},
"scripts": {
"start": "set PORT=8080 HTTPS=true && react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"ie 11",
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/jquery": "^3.5.14",
"@types/react": "^18.0.6",
"@types/react-dom": "^18.0.2",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"eslint": "^8.14.0",
"typescript": "^4.6.3"
}
}