Parsing error: require() of ES Module
Nazmulislam007 opened this issue · 0 comments
Nazmulislam007 commented
In package.json, update the line
"babel-eslint": "^10.0.2"
, to "@babel/eslint-parser": "^7.5.4"
This works with the code above but it may be better to use the latest version, which at the time of writing is 7.16.3. Then run npm i
to update node_modules.
In .eslintrc, update the parser line "parser": "babel-eslint"
, to "parser": "@babel/eslint-parser"
,
In .eslintrc, add "requireConfigFile": false
, to the parserOptions section (undern "ecmaVersion": 8
) .