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
rising-crimson•16h ago
does it work locally when building for node server ?
fascinating-indigoOP•16h ago
Yes
rising-crimson•16h ago
try deploying without vercel build cache
fascinating-indigoOP•16h ago
How to do that'
rising-crimson•16h ago
redeploy and uncheck that checkbox
fascinating-indigoOP•16h ago

fascinating-indigoOP•16h ago
I dont have that?
rising-crimson•16h 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...
rising-crimson•16h ago
you need to explicitly redeploy
fascinating-indigoOP•16h 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
rising-crimson•16h ago
on which nitro v2 plugin version are you?
make sure you are on latest as this was changed today
fascinating-indigoOP•16h ago
"@tanstack/nitro-v2-vite-plugin": "^1.132.39",
This stopped working today
After I did my maintenance bun update
rising-crimson•16h ago
and building locally works? with bun as target?
fascinating-indigoOP•16h ago
Target as in tsconfig target?
But it works yes locally works fine
fascinating-indigoOP•16h ago

rising-crimson•16h ago
but are you building for production locally?
fascinating-indigoOP•16h ago
Nope
rising-crimson•16h ago
or just running the dev server
fascinating-indigoOP•16h ago
Dev server
rising-crimson•16h ago
that's what i asked here
then please do that
fascinating-indigoOP•16h ago
I mean, I am getting completly unrelatead issue:

rising-crimson•16h ago
can you share a complete project?
fascinating-indigoOP•16h ago
Not really, private..., if you can hop on call i can share that way
What do you need
rising-crimson•15h ago
hm i think i can reproduce this with bun
for now, please use
bun install --linker isolated
fascinating-indigoOP•15h ago
Use that where? For what?
rising-crimson•15h ago
when installing dependencies
fascinating-indigoOP•15h ago

fascinating-indigoOP•15h ago
I just did and 0 changes
rising-crimson•15h ago
rm the lockfile
fascinating-indigoOP•15h ago
Ok sure but what after? Will i be able to deploy on vercel?
rising-crimson•15h ago
try it locally first
fascinating-indigoOP•15h 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"
rising-crimson•15h ago
it worked for me locally
had the same issue before that
try removing the node_modules folder as well
fascinating-indigoOP•15h 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
rising-crimson•15h ago
that it should work on vercel again as well
fascinating-indigoOP•15h ago
No bro, the error persists
But also what was the plan behind removing node_modules locally?
rising-crimson•15h ago
forcing a clean reinstall
fascinating-indigoOP•15h ago
Once again, and I dont mean to be rude, what does that have to do with vercel?
rising-crimson•15h ago
you first need to make sure it works locally
if it doesnt, why even try deploying?
faster feedback
fascinating-indigoOP•15h ago
Manuel thank you for your help
We are not moving at all
Please just fix this
Soon
For everyone
rising-crimson•15h ago
lol
fascinating-indigoOP•15h ago
It worked perfectly fine 1 week ago
Please please please
Fix this for me
This is so extremly annoying
rising-crimson•15h ago
just stay on a working version then until this is resolved
fascinating-indigoOP•15h 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";
rising-crimson•15h ago
we are constantly fixing things on v1.132.x
fascinating-indigoOP•15h ago
I am only person to ever report this issue
rising-crimson•14h 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