Skip to content

bug: fetch error on dev preview in Nuxt v4 #163

Description

@Ast3risk-ops

Environment

  System:
    OS: Linux 6.15 EndeavourOS
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 21.57 GB / 31.21 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 22.17.0 - /usr/bin/node
    npm: 11.4.2 - /usr/bin/npm
    pnpm: 10.13.1 - /usr/bin/pnpm
    bun: 1.2.18 - ~/.bun/bin/bun
  npmPackages:
    nuxt: ^4.0.0 => 4.0.0 
    shadcn-docs-nuxt: ^1.1.2 => 1.1.2 
    vue: ^3.5.17 => 3.5.17 

Describe the bug

The error (below) shows on the dev server (though the dev preview still works fine)

Reproduction

https://github.com/ast3risk-ops/archiver/tree/main/www

Additional context

No response

Logs

[8:18:30 p.m.]  ERROR  [request error] [unhandled] [GET] http://localhost:3000/_fonts/v1uIKycIfkgtdywcltIrSda4-zIfiQI75rj_JBTihK4-0npveVZ6AftfGLmdzS79m9XnVJXgM5ahXtoPMeIHito.woff

 
ℹ Error: fetch failed

 ⁃ (node:internal/deps/undici/undici:13510:13)
 ⁃ at processTicksAndRejections (node:internal/process/task_queues:105:5)
 ⁃ at runNextTicks (node:internal/process/task_queues:69:3)
 ⁃ at listOnTimeout (node:internal/timers:549:9)
 ⁃ at process.processTimers (node:internal/timers:523:7)
 ⁃ at async Object.devEventHandler [as handler] (node_modules/@nuxt/fonts/dist/module.mjs:577:13)

   572 ┃        throw createError({ statusCode: 404 });
   573 ┃      }
   574 ┃      const key = "data:fonts:" + filename2;
   575 ┃      let res = await storage.getItemRaw(key);
   576 ┃      if (!res) {
 ❯ 577 ┃        res = await fetch(url).then((r) => r.arrayBuffer()).then((r) => Buffer.from(r));
   578 ┃        await storage.setItemRaw(key, res);
   579 ┃      }
   580 ┃      return res;
   581 ┃    }
   582 ┃    addDevServerHandler({

 ⁃ at async Object.handler (node_modules/h3/dist/index.mjs:2003:19)
 ⁃ at async NuxtDevServer.toNodeHandle [as _handler] (node_modules/h3/dist/index.mjs:2295:7)

[CAUSE]
AggregateError {
  stack: '\n' +
  '    at internalConnectMultiple (node:net:1134:18)\n' +
  '    at internalConnectMultiple (node:net:1210:5)\n' +
  '    at Timeout.internalConnectMultipleTimeout (node:net:1742:5)\n' +
  '    at listOnTimeout (node:internal/timers:590:11)\n' +
  '    at process.processTimers (node:internal/timers:523:7)',
  errors: [
    [Object],
    [Object],
  ],
  code: 'ETIMEDOUT',
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions