Home > Back-end >  Failed to load parser '@typescript-eslint/parser' declared in 'package.json » eslint-
Failed to load parser '@typescript-eslint/parser' declared in 'package.json » eslint-

Time:11-24

I was testing out a typescript code in my react project. With little knowledge about typescript, i heeded to visual studio code's suggestion on configuring a typescript builtin interpreter.

All i want to do now is have nothing to do with typescript

I deleted the typescript folder and now i'm stuck with an error. Below is the full traceback

Failed to load parser '@typescript-eslint/parser' declared in 'package.json » eslint-config-react-app#overrides[0]': Cannot find module 'typescript'
Require stack:
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/@typescript-eslint/typescript-estree/dist/parser.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/@typescript-eslint/typescript-estree/dist/index.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/@typescript-eslint/parser/dist/parser.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/@typescript-eslint/parser/dist/index.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/eslint/lib/cli-engine/config-array-factory.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/eslint/lib/cli-engine/cli-engine.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/eslint/lib/cli-engine/index.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/eslint/lib/api.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/eslint-webpack-plugin/dist/getESLint.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/eslint-webpack-plugin/dist/linter.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/eslint-webpack-plugin/dist/index.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/eslint-webpack-plugin/dist/cjs.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/react-scripts/config/webpack.config.js
- /home/freduah/Desktop/Desktop/Learned_Project/LearnedBackend/Backend/LearnedWebDevelopment/node_modules/react-scripts/scripts/start.js

Thank You In Advance

CodePudding user response:

you might need to share the package.json file settings and probably some file structure overview as well so that anybody knows what is to be deleted or fixed. Anyway it is always good to delete the node_modules and package-lock.json file and npm i again to delete obsolete folders and dependencies. Good luck for now.

CodePudding user response:

I would like to see your package.json file so I don't need to result in guessing. I recommend not to remove the typescript folder manually wherever you deleted it.

I should point out that this is not a recommended approach to a problem but I want to help. Try deleting the @typescript-eslint directory in node_modules if that does the trick. It may be a dependency to a different package but I presume you have not added any typescript dependent packages.

  • Related