DEV Community

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

Posted on

7 3

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

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay