You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[@sentry/sveltekit 11] Build fails with "ReferenceError: cp is not defined" when sentrySvelteKit() is in the Vite plugins (adapter-vercel) #25113
Vite and Rollup finish, then SvelteKit's post-build analyse step crashes while importing a server chunk:
ReferenceError: cp is not defined
at file:///…/.svelte-kit/output/server/chunks/node.js:26:18
at ModuleJob.run (node:internal/modules/esm/module_job:439:25)
at async node:internal/modules/esm/loader:643:26
at async analyse (…/@sveltejs/kit/src/core/postbuild/analyse.js:47:19)
at async MessagePort.<anonymous> (…/@sveltejs/kit/src/utils/fork.js:23:16)
The generated chunk keeps node:child_process as a side-effect-only import, but still references the binding:
The chunk's source map lists only @sveltejs/kit/src/runtime/shared-server.js. No importer uses the node export; they import only SvelteKit's public_env and private_env from this chunk.
What I narrowed down
Every build below used the same project and the same lockfile, with VERCEL=1:
Configuration
Result
@sentry/sveltekit 11.4.0, sentrySvelteKit()not in plugins
✅ builds
No Sentry plugin, but build.sourcemap: 'hidden'
✅ builds
11.4.0 with sentrySvelteKit({ org, project, authToken })
❌ cp is not defined
… plus autoInstrument: false
❌
… plus release: { inject: false }
❌
… plus sourcemaps: { disable: true }
❌
… with all three, and adapter: 'vercel' or adapter: 'other'
❌
@sentry/sveltekit 10.75.0 with the equivalent 10.x config
✅ builds
So the failure appears whenever sentrySvelteKit() is in the plugin list, whichever of its features are switched off. Source maps on their own are not the cause.
Additional Context
We're staying on 10.x until this is fixed. Happy to test a patched build. I can't share the app itself, but I can try particular options or provide more of the generated output.
Hey @ChaliceForAuri thanks for reaching out here. Tried to repro this and looks like this already got fixed in rollup. Can you upgrade rollup to 4.63.6 or newer and see if your issue persists?
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
Activity
linear-code commentedon Oct 6, 2026
JS-3887
chargome commentedon Oct 7, 2026
Hey @ChaliceForAuri thanks for reaching out here. Tried to repro this and looks like this already got fixed in rollup. Can you upgrade rollup to
4.63.6or newer and see if your issue persists?getsantry commentedon Oct 29, 2026
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you remove the label
Waiting for: Community, I will leave it alone ... forever!"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀