Next/Babel error
Answered
.dric posted this in #help-forum
.dricOP
Hello.
I keep getting this next/babel error from .eslintrc.json and I honestly don't know why. I've tried playing around with the file to fix the error.
#1. Changed the extends
#2. Put babel in the plugins object
NOTE: I'm using Vercel to host my website.
Here is the error I'm getting:
The website is still able to get deployed, but I want to fix this error so it doesn't randomly come up later in production.
Here is my
If you can help me, that would be great. Thanks!
I keep getting this next/babel error from .eslintrc.json and I honestly don't know why. I've tried playing around with the file to fix the error.
#1. Changed the extends
#2. Put babel in the plugins object
NOTE: I'm using Vercel to host my website.
Here is the error I'm getting:
ESLint: Failed to load config "next/babel" to extend from. Referenced from: /vercel/path0/nexus/.eslintrc.json
Collecting page data ...
Generating static pages (0/33) ...
Generating static pages (8/33)
Generating static pages (16/33)
Generating static pages (24/33) The website is still able to get deployed, but I want to fix this error so it doesn't randomly come up later in production.
Here is my
.eslintrc.json file:{
"extends": ["next/core-web-vitals", "next/babel"],
"plugins": ["@babel/plugin-proposal-do-expressions"],
"rules": {
"react/no-unescaped-entities": "off",
"@next/next/no-page-custom-font": "off"
}
}If you can help me, that would be great. Thanks!
15 Replies
@!=tgt remove the `"next/babel"` entry from the `extends` array
.dricOP
okay, so after removing that I got this error:
⨯ ESLint: Failed to load plugin '@babel/plugin-proposal-do-expressions' declared in '.eslintrc.json': Cannot find module '@babel/eslint-plugin-plugin-proposal-do-expressions' Require stack: - /vercel/path0/nexus/__placeholder__.js
Collecting page data ...
Generating static pages (0/33) ...
Generating static pages (8/33)
Generating static pages (16/33)
Generating static pages (24/33) @!=tgt now remove the entry from the plugins array
.dricOP
That made the file unable to compile in deployment
💀
@.dric That made the file unable to compile in deployment
{
"extends": ["next/core-web-vitals"],
"rules": {
"react/no-unescaped-entities": "off",
"@next/next/no-page-custom-font": "off"
}
}use that
@.dric Click to see attachment
fix the eslint errors
Answer
@.dric ahh it worked
mark my answer as solution
