4

I am trying to generate build of my next-js app by running "npm run build". but unfortunately i am getting this error everytime. error getting while running npm run build here is my .eslintrc.json file .eslintrc.json and .babelrc .babelrc.

Aaqib Rasool
  • 47
  • 1
  • 3

1 Answers1

3

Changing next/babel in .eslintrcto next worked for the warning to disappear. However, in my vscode a bunch of new errors came up related Parsing error : Cannot find module 'next/babel' As a result this answer is a great fit for this question as well : https://stackoverflow.com/a/68193974/13943679

Pavel Fedotov
  • 748
  • 1
  • 7
  • 29
  • 1
    But this solution of the other question (you provided) doesn't work until you add `next/babel` – Tayyab Ferozi Jan 17 '23 at 09:10
  • oh, actually now it makes sense – Pavel Fedotov Jan 17 '23 at 20:10
  • 1
    @PavelFedotov, Changing the ESLint configuration from "next/babel" to "next" in the `.eslintrc.json` file affects the set of linting rules and configurations applied to your Next.js project. The "next/babel" configuration extends the "next" configuration and includes additional rules specific to Babel. It is designed for projects that use Babel as their JavaScript compiler. On the other hand, the "next" configuration is a baseline configuration provided by the Next.js team. It includes linting rules and settings specific to Next.js projects, without any additional rules for Babel. – Andile May 17 '23 at 12:25