🟨 JavaScript

[eslint] Failed to load parser 'babel-eslint' declared in 'package.json' Error Handling

10000COW 2022. 12. 19. 12:44
728x90

The Reason of this Error

'babel-eslint' has deprecated and it causes this error.

All you have to do is changing parser from deprecated 'babel-eslint' to '@babel/eslint-parser'

 

Error Solution

1. Open your react file using IDE(For me, VSCode)

 

2. Find node_modules Directory and you can find eslint-config-react-app / base.js in this directory.

 

3. You should change parser in module.exports from babel-eslint to @babel/eslint-parser 

 

4. Do 'yarn install' again and 'yarn start' (or npm)

 

728x90