Description
Which project does this relate to?
Start
Describe the bug
after migrating, wrangler deploy errors out. worked before migration
✔ Nitro Server built nitro 11:09:52 AM
└─ .output/server/index.mjs (2.6 MB) (667 kB gzip)
Σ Total size: 2.6 MB (667 kB gzip)
[nitro 11:09:52 AM] ✔ You can preview this build using npx wrangler dev .output/server/index.mjs --site .output/public
✔ You can deploy this build using npx wrangler deploy nitro 11:09:52 AM
[nitro 11:09:52 AM] ✔ Client and Server bundles for TanStack Start have been successfully built.
bunx wrangler deploy
⛅️ wrangler 4.19.2
───────────────────
▲ [WARNING] Using direct eval with a bundler is not recommended and may cause problems [direct-eval]
.output/server/index.mjs:1:1654555:
1 │ ...ped_bm_rt,expression_function=eval("[function _expression_functi...
╵ ~~~~
You can read more about direct eval and bundling here: https://esbuild.github.io/link/direct-eval
✘ [ERROR] Build failed with 1 error:
✘ [ERROR] Unexpected external import of
"node:events", "node:perf_hooks", "node:stream", and "node:tty".
Your worker has no default export, which means it is assumed to be a Service
Worker format Worker.
Did you mean to create a ES Module format Worker?
If so, try adding `export default { ... }` in your entry-point.
See
https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/.
[plugin hybrid-nodejs_compat]
▲ [WARNING] Using direct eval with a bundler is not recommended and may cause problems [direct-eval]
.output/server/index.mjs:1:1654555:
1 │ ...ped_bm_rt,expression_function=eval("[function _expression_functi...
╵ ~~~~
You can read more about direct eval and bundling here: https://esbuild.github.io/link/direct-eval
🪵 Logs were written to "/Users/erik/Library/Preferences/.wrangler/logs/wrangler-2025-06-12_09-10-52_855.log"
Your Example Website or App
sorry don't have
Steps to Reproduce the Bug or Issue
- vite build
- wrangler deploy
Expected behavior
successful deployment
Screenshots or Videos
Platform
"@tanstack/react-form": "^1.11.1",
"@tanstack/react-query": "^5.71.10",
"@tanstack/react-router": "^1.121.0-alpha.27",
"@tanstack/react-router-with-query": "^1.121.0",
"@tanstack/react-start": "^1.121.0-alpha.27",
"@tanstack/react-start-config": "^1.120.20",
"@tanstack/react-table": "8.21.2",
"@tanstack/router-plugin": "^1.121.0",
OS: macOS 14.6.1
Memory: 16 GiB
Architecture: aarch64
Additional context
import viteTsConfigPaths from "vite-tsconfig-paths";
import tailwindcss from "@tailwindcss/vite";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [
tanstackStart({
target: "cloudflare",
}),
viteTsConfigPaths({
projects: ["./tsconfig.json"],
}),
tailwindcss(),
],
});