Parsing error: Cannot read property ‘map’ of undefined
this is the error I get when I try to npm start the code, is it an error with my eslint configuration, how do I solve it please?
Parsing error: Cannot read property ‘map’ of undefined
this is the error I get when I try to npm start the code, is it an error with my eslint configuration, how do I solve it please?
Hey @Yahya_Elfaqir
This error occurs because react-scripts is directly dependent on 2.xx range of @typescript-eslint/parser
@typescript-eslint/eslint-plugin
.
You can fix this issue by adding a resolutions field to your package.json
as:
"resolutions": {
"**/@typescript-eslint/eslint-plugin": "^4.1.1",
"**/@typescript-eslint/parser": "^4.1.1"
}
If you still face any issues, feel free to ask.
Happy learning,