DEV Community

Cover image for How to fix EsLint Error: Must use import to load ES Module
Andi Rustianto
Andi Rustianto

Posted on

How to fix EsLint Error: Must use import to load ES Module

How to fix EsLint Error: Must use import to load ES Module

1.Add eslint-parser in package.json, inside of devDependecies

"@babel/eslint-parser": "^7.5.4",
Enter fullscreen mode Exit fullscreen mode

2.Open .eslintrc.js file, and add eslint-parser

parser: '@babel/eslint-parser',
Enter fullscreen mode Exit fullscreen mode

Discussion (0)