T
TanStack2mo ago
flat-fuchsia

I am getting this error in my tanstack start + nitro v2 deployment on vercel

[error] [nitro] RollupError: server.js (6:18): "toResponse" is not exported by "node_modules/h3/dist/index.mjs", imported by "server.js".
47 Replies
genetic-orange
genetic-orange2mo ago
does it work locally when building for node server ?
flat-fuchsia
flat-fuchsiaOP2mo ago
Yes
genetic-orange
genetic-orange2mo ago
try deploying without vercel build cache
flat-fuchsia
flat-fuchsiaOP2mo ago
How to do that'
genetic-orange
genetic-orange2mo ago
redeploy and uncheck that checkbox
flat-fuchsia
flat-fuchsiaOP2mo ago
No description
flat-fuchsia
flat-fuchsiaOP2mo ago
I dont have that?
genetic-orange
genetic-orange2mo ago
GitHub
Is there a way to to skip the build cache in Vercel? · vercel verc...
Hey there, I'm trying to find out if there's a flag or environment variable to skip the build cache in Vercel? Similar to how it's used in the CLI: https://vercel.com/docs/cli#introduct...
genetic-orange
genetic-orange2mo ago
you need to explicitly redeploy
flat-fuchsia
flat-fuchsiaOP2mo ago
Yeye see it Thank you Spoke too soon 4: import { getOrigin, attachRouterServerSsrUtils } from "@tanstack/router-core/ssr/server"; 5: import { AsyncLocalStorage } from "node:async_hooks"; 6: import { H3Event, toResponse } from "h3"; ^ 7: import invariant from "tiny-invariant"; 8: import { toCrossJSONStream, toCrossJSONAsync, fromJSON } from "seroval"; error during build: RollupError: server.js (6:18): "toResponse" is not exported by "node_modules/h3/dist/index.mjs", imported by "server.js". at getRollupError (file:///vercel/path0/node_modules/nitropack/node_modules/rollup/dist/es/shared/parseAst.js:401:41) at error (file:///vercel/path0/node_modules/nitropack/node_modules/rollup/dist/es/shared/parseAst.js:397:42) at Module.error (file:///vercel/path0/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:16939:16) at Module.traceVariable (file:///vercel/path0/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:17391:29) at ModuleScope.findVariable (file:///vercel/path0/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:15061:39) at FunctionScope.findVariable (file:///vercel/path0/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:5642:38) at FunctionBodyScope.findVariable (file:///vercel/path0/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:5642:38) at ReturnValueScope.findVariable (file:///vercel/path0/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:5642:38) at FunctionBodyScope.findVariable (file:///vercel/path0/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:5642:38) at Identifier.bind (file:///vercel/path0/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:5413:40) Now i get this error
genetic-orange
genetic-orange2mo ago
on which nitro v2 plugin version are you? make sure you are on latest as this was changed today
flat-fuchsia
flat-fuchsiaOP2mo ago
"@tanstack/nitro-v2-vite-plugin": "^1.132.39", This stopped working today After I did my maintenance bun update
genetic-orange
genetic-orange2mo ago
and building locally works? with bun as target?
flat-fuchsia
flat-fuchsiaOP2mo ago
Target as in tsconfig target? But it works yes locally works fine
flat-fuchsia
flat-fuchsiaOP2mo ago
No description
genetic-orange
genetic-orange2mo ago
but are you building for production locally?
flat-fuchsia
flat-fuchsiaOP2mo ago
Nope
genetic-orange
genetic-orange2mo ago
or just running the dev server
flat-fuchsia
flat-fuchsiaOP2mo ago
Dev server
genetic-orange
genetic-orange2mo ago
that's what i asked here then please do that
flat-fuchsia
flat-fuchsiaOP2mo ago
I mean, I am getting completly unrelatead issue:
No description
genetic-orange
genetic-orange2mo ago
can you share a complete project?
flat-fuchsia
flat-fuchsiaOP2mo ago
Not really, private..., if you can hop on call i can share that way What do you need
genetic-orange
genetic-orange2mo ago
hm i think i can reproduce this with bun for now, please use bun install --linker isolated
flat-fuchsia
flat-fuchsiaOP2mo ago
Use that where? For what?
genetic-orange
genetic-orange2mo ago
when installing dependencies
flat-fuchsia
flat-fuchsiaOP2mo ago
No description
flat-fuchsia
flat-fuchsiaOP2mo ago
I just did and 0 changes
genetic-orange
genetic-orange2mo ago
rm the lockfile
flat-fuchsia
flat-fuchsiaOP2mo ago
Ok sure but what after? Will i be able to deploy on vercel?
genetic-orange
genetic-orange2mo ago
try it locally first
flat-fuchsia
flat-fuchsiaOP2mo ago
Does not work... Again same issue with rollup [error] [nitro] RollupError: server.js (6:18): "toResponse" is not exported by "node_modules/h3/dist/index.mjs"
genetic-orange
genetic-orange2mo ago
it worked for me locally had the same issue before that try removing the node_modules folder as well
flat-fuchsia
flat-fuchsiaOP2mo ago
Okey, but even if it works on local what does it matter for me I am not hosting my website on my local machine But yeah for me even locally same issue
genetic-orange
genetic-orange2mo ago
that it should work on vercel again as well
flat-fuchsia
flat-fuchsiaOP2mo ago
No bro, the error persists But also what was the plan behind removing node_modules locally?
genetic-orange
genetic-orange2mo ago
forcing a clean reinstall
flat-fuchsia
flat-fuchsiaOP2mo ago
Once again, and I dont mean to be rude, what does that have to do with vercel?
genetic-orange
genetic-orange2mo ago
you first need to make sure it works locally if it doesnt, why even try deploying? faster feedback
flat-fuchsia
flat-fuchsiaOP2mo ago
Manuel thank you for your help We are not moving at all Please just fix this Soon For everyone
genetic-orange
genetic-orange2mo ago
lol
flat-fuchsia
flat-fuchsiaOP2mo ago
It worked perfectly fine 1 week ago Please please please Fix this for me This is so extremly annoying
genetic-orange
genetic-orange2mo ago
just stay on a working version then until this is resolved
flat-fuchsia
flat-fuchsiaOP2mo ago
It was the RC version Building Nitro Server (preset: node-server, compatibility date: 2025-10-05) nitro 9:42:49 PM node_modules/@convex-dev/presence/dist/esm/react/index.js (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/@convex-dev/presence/dist/esm/react/index.js" was ignored. ERROR RollupError: server.js (6:18): "toResponse" is not exported by "node_modules/h3/dist/index.mjs", imported by "server.js". nitro 9:44:25 PM 4: import { getOrigin, attachRouterServerSsrUtils } from "@tanstack/router-core/ssr/server"; 5: import { AsyncLocalStorage } from "node:async_hooks"; 6: import { H3Event, toResponse } from "h3"; ^ 7: import invariant from "tiny-invariant"; 8: import { toCrossJSONStream, toCrossJSONAsync, fromJSON } from "seroval";
genetic-orange
genetic-orange2mo ago
we are constantly fixing things on v1.132.x
flat-fuchsia
flat-fuchsiaOP2mo ago
I am only person to ever report this issue
genetic-orange
genetic-orange2mo ago
yes cause this change happened a few hours ago this change was reverted, we are looking for a fix that also works on bun

Did you find this page helpful?