T
TanStack3mo ago
foreign-sapphire

Local dev fails after some time

Repo: https://github.com/sebastiangraz/hatchet Running npm run dev works initially with no errors, after I make a few changes and hot-reloads I get the following error and my localhost:3000 disconnects fully, I have to reconnect every 2-3 hmr changes, not ideal.
1:57:49 PM [vite] (client) hmr update /src/routes/(home)/index.tsx, /src/routes/(home)/index.tsx?tsr-split=component
1:57:49 PM [vite] (ssr) page reload src/routes/(home)/index.tsx
[vite] program reload
node:internal/deps/undici/undici:13510
Error.captureStackTrace(err);
^

TypeError: fetch failed
at node:internal/deps/undici/undici:13510:13
at async file:///C:/Users/Sebastian/development/hatchet/node_modules/nitro/dist/_chunks/plugin.mjs:379:20 {
[cause]: HeadersTimeoutError: Headers Timeout Error
at FastTimer.onParserTimeout [as _onTimeout] (C:\Users\Sebastian\development\hatchet\node_modules\undici\lib\dispatcher\client-h1.js:757:28)
at Timeout.onTick [as _onTimeout] (C:\Users\Sebastian\development\hatchet\node_modules\undici\lib\util\timers.js:162:13)
at listOnTimeout (node:internal/timers:588:17)
at process.processTimers (node:internal/timers:523:7) {
code: 'UND_ERR_HEADERS_TIMEOUT'
}
}

Node.js v22.19.0
1:57:49 PM [vite] (client) hmr update /src/routes/(home)/index.tsx, /src/routes/(home)/index.tsx?tsr-split=component
1:57:49 PM [vite] (ssr) page reload src/routes/(home)/index.tsx
[vite] program reload
node:internal/deps/undici/undici:13510
Error.captureStackTrace(err);
^

TypeError: fetch failed
at node:internal/deps/undici/undici:13510:13
at async file:///C:/Users/Sebastian/development/hatchet/node_modules/nitro/dist/_chunks/plugin.mjs:379:20 {
[cause]: HeadersTimeoutError: Headers Timeout Error
at FastTimer.onParserTimeout [as _onTimeout] (C:\Users\Sebastian\development\hatchet\node_modules\undici\lib\dispatcher\client-h1.js:757:28)
at Timeout.onTick [as _onTimeout] (C:\Users\Sebastian\development\hatchet\node_modules\undici\lib\util\timers.js:162:13)
at listOnTimeout (node:internal/timers:588:17)
at process.processTimers (node:internal/timers:523:7) {
code: 'UND_ERR_HEADERS_TIMEOUT'
}
}

Node.js v22.19.0
"@tanstack/react-router": "^1.132.6",
"@tanstack/react-router-devtools": "^1.132.6",
"@tanstack/react-start": "^1.132.6",
"nitro": "npm:nitro-nightly@^3.0.0-20250925-102916-440c34dc",
"vite": "^7.1.7",
"@tanstack/react-router": "^1.132.6",
"@tanstack/react-router-devtools": "^1.132.6",
"@tanstack/react-start": "^1.132.6",
"nitro": "npm:nitro-nightly@^3.0.0-20250925-102916-440c34dc",
"vite": "^7.1.7",
Same with npm:nitro-nightly@latest Anyone else get this?
4 Replies
foreign-sapphire
foreign-sapphire3mo ago
Yes i have the same issue
correct-apricot
correct-apricot3mo ago
yep, also seeing this error
flat-fuchsia
flat-fuchsia3mo ago
most likely a nitro issue can you please comment out nitro in vite config and see if this still occurs? if this only occurs with nitro, can you please create an issue at https://github.com/nitrojs/nitro/issues/ ?
foreign-sapphire
foreign-sapphireOP2mo ago
Can confirm commenting out nitro() fixed it. Someone else opened a similar issue

Did you find this page helpful?