-
-
Notifications
You must be signed in to change notification settings - Fork 780
Open
Labels
Description
Environment
- nitro: 3.0.1-alpha.2
- Runtime: Bun 1.3.5
- Framework: TanStack Start
- Affected packages: end-of-stream@1.4.5, duplexify@4.1.3 (via @google-cloud/*)
Reproduction
- Create a TanStack Start app with @google-cloud/storage or @google-cloud/monitoring dependency (these pull in duplexify → end-of-stream)
- Use nitro@3.0.1-alpha.2 with nitro/vite plugin as recommended by the hosting guide
- Build and run: bun run .output/server/index.mjs
Now, this was actually working fine before this alpha.2, and it seemed fine until it just started crashing, seemingly out of nowhere after a few runs of some workflows in my app.
Describe the bug
After upgrading to nitro@3.0.1-alpha.2, server builds crash at runtime with:
TypeError: undefined is not an object (evaluating 'commonjsGlobal.Bare')
at requireEndOfStream (/app/.output/server/_libs/end-of-stream.mjs:11:13)
at requireDuplexify (/app/.output/server/_libs/duplexify.mjs:11:32)
Additional context
The end-of-stream@1.4.5 package has Bare runtime detection:
var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process);
Logs
TypeError: undefined is not an object (evaluating 'commonjsGlobal.Bare')
at requireEndOfStream (/app/.output/server/_libs/end-of-stream.mjs:11:13)
at requireDuplexify (/app/.output/server/_libs/duplexify.mjs:11:32)
11 | var qnt = commonjsGlobal.Bare ? queueMicrotask : process.nextTick.bind(process);
error: undefined is not an object (evaluating 'commonjsGlobal.Bare')Reactions are currently unavailable