30 C
Dubai
Thursday, November 21, 2024

Next Js Build Error fetch failed with undici

Node Js Build Error fetch failed with undici – Run Node Js 18.0 – 18.x minor versions cause this error. (Bug)

npm install

npm run dev

npm run build

C:\Scripts\repo\azure365pro-Guide>npm install

up to date, audited 707 packages in 4s

97 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (1 moderate, 3 high, 4 critical)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
npm notice
npm notice New major version of npm available! 8.19.2 -> 9.2.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.2.0
npm notice Run npm install -g npm@9.2.0 to update!
npm notice

C:\Scripts\repo\azure365pro-Guide>npm run dev

> dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
event - compiled client and server successfully in 869 ms (228 modules)
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Terminate batch job (Y/N)? Y

C:\Scripts\repo\azure365pro-Guide>npm run build

> build
> next build

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
info  - Checking validity of types

./pages/buscar.js
92:7  Warning: React Hook useEffect has a missing dependency: 'fetchFilterOptions'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./pages/colegio/[cid].js
261:65  Warning: Image elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
278:33  Warning: Image elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
294:60  Warning: Image elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
318:25  Warning: Image elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
323:25  Warning: Image elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
328:25  Warning: Image elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
336:25  Warning: Image elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text

./components/SearchInput.js
33:7  Warning: React Hook useEffect has a missing dependency: 'fetchFilterOptions'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
info  - Creating an optimized production build
Failed to compile.

./public/images/banner.jpg
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11118:11)

Import trace for requested module:
./pages/index.js

./public/images/condiciones.jpg
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11118:11)

Import trace for requested module:
./pages/condiciones.js

./public/images/conoce.jpg
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11118:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Import trace for requested module:
./pages/index.js

./public/images/graduation.jpg
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11118:11)

Import trace for requested module:
./pages/buscar.js


> Build failed because of webpack errors

C:\Scripts\repo\azure365pro-Guide>
Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?