DEV Community

Gld
Gld

Posted on

Answer: Parsing error : Cannot find module 'next/babel'

You don't need to create an extra .babelrc file.

In your NextJS project you have a file named .eslintrc.json In this file you have following code:

{
  "extends": "next/core-web-vitals"
}

Replace it with

{
  "extends": ["next/babel","next/core-web-vitals"]
}

Note: If you only replace with

{
   "extends": ["next/babel"]
}

The red…

Top comments (0)