1

Geting " error - ESLint: Failed to load config "next/babel" to extend from. Referenced from: /vercel/path0/.eslintrc.json " when deploying to vercel

Full vercel Building log -

>     [17:04:07.398] Cloning github.com/Bossman556/TechMoneyLlc (Branch: main, Commit: f3bd62f)
>     [17:04:07.529] Previous build cache not available
>     [17:04:09.752] Cloning completed: 2.354s
>     [17:04:10.117] Note: Not using build cache:
>     [17:04:10.117]   - can not verify whether nodejs version of build cache (<unknown>) is same as current detected version (16.x)
>     [17:04:10.117]   - can not verify whether package manager of build cache (<unknown>) is same as current detected value (npm)
>     [17:04:10.175] Running "vercel build"
>     [17:04:10.802] Vercel CLI 28.4.12-05a80a4
>     [17:04:11.229] Installing dependencies...
>     [17:04:28.143] npm WARN deprecated core-js@3.6.5: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the
> number of issues. Because of the V8 engine whims, feature detection in
> old core-js versions could cause a slowdown up to 100x even if nothing
> is polyfilled. Some versions have web compatibility issues. Please,
> upgrade your dependencies to the actual version of core-js.
>     [17:04:32.866] 
>     [17:04:32.866] added 519 packages in 21s
>     [17:04:32.867] 
>     [17:04:32.867] 95 packages are looking for funding
>     [17:04:32.867]   run `npm fund` for details
>     [17:04:32.889] Detected Next.js version: 12.3.1
>     [17:04:32.895] Detected `package-lock.json` generated by npm 7+...
>     [17:04:32.895] Running "npm run build"
>     [17:04:33.280] 
>     [17:04:33.280] > scam@0.1.0 build
>     [17:04:33.280] > next build
>     [17:04:33.280] 
>     [17:04:33.835] Attention: Next.js now collects completely anonymous telemetry regarding usage.
>     [17:04:33.836] This information is used to shape Next.js' roadmap and prioritize features.
>     [17:04:33.836] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting
> the following URL:
>     [17:04:33.836] https://nextjs.org/telemetry
>     [17:04:33.836] 
>     [17:04:33.974] info  - Linting and checking validity of types...
>     [17:04:34.464] error - ESLint: Failed to load config "next/babel" to extend from. Referenced from: /vercel/path0/.eslintrc.json
>     [17:04:37.562] info  - Creating an optimized production build...
>     [17:04:37.909] info  - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc"
> https://nextjs.org/docs/messages/swc-disabled
>     [17:04:38.680] info  - Using external babel configuration from /vercel/path0/.babelrc
>     [17:04:55.776] info  - Compiled successfully
>     [17:04:55.776] info  - Collecting page data...
>     [17:04:59.982] 
>     [17:04:59.982] > Build optimization failed: found page without a React Component as default export in 
>     [17:04:59.987] pages/vidsForCourses/VideoPlayer
>     [17:04:59.987] 
>     [17:04:59.987] See https://nextjs.org/docs/messages/page-without-valid-component for more
> info.
>     [17:04:59.988] 
>     [17:05:00.039] Error: Command "npm run build" exited with 1

My .eslintrc.json

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

My .babelrc

{
    "presets": ["next/babel"],
    "plugins": []
  }

Next.js verson

Next.js v12.3.1

I have tried a lot of solutions but nothing has worked. Its works fine on http://localhost:3000/.

I also have tried this but got the same error.

Any help is very appreciated since I've been stuck on his error for a while.

  • Replace the contents of your `.eslintrc.json` with `"extends": "next/core-web-vitals"`. Also, you have another error in `pages/vidsForCourses/VideoPlayer` - see https://nextjs.org/docs/messages/page-without-valid-component. – juliomalves Nov 01 '22 at 22:38

0 Answers0