I started a new project with Clerk and Convex, target deployment to CF Workers, build errors
I set up development and production environments in wrangler.toml and I'm attempting deployments both via GH actions and locally, with zero success.
The error I'm getting during the nitro build is this:
The vite build until nitro passes, .output/public gets generated.
6 Replies
deep-jadeOP•3mo ago
"dependencies": {
"@clerk/clerk-react": "^5.32.2",
"@clerk/tanstack-react-start": "^0.17.0",
"@clerk/tanstack-start": "^0.11.5",
"@convex-dev/react-query": "0.0.0-alpha.8",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-checkbox": "^1.3.2",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-dropdown-menu": "^2.1.15",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-tabs": "^1.1.12",
"@radix-ui/react-toggle": "^1.1.9",
"@radix-ui/react-toggle-group": "^1.1.10",
"@radix-ui/react-tooltip": "^1.2.7",
"@tabler/icons-react": "^3.34.0",
"@tanstack/react-query": "^5.81.4",
"@tanstack/react-query-devtools": "^5.81.4",
"@tanstack/react-router": "^1.121.41",
"@tanstack/react-router-with-query": "^1.121.41",
"@tanstack/react-start": "^1.121.41",
"@tanstack/react-start-config": "^1.120.20",
"@tanstack/react-table": "^8.21.3",
"@tanstack/router-devtools": "^1.121.41",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"convex": "^1.25.0",
"convex-helpers": "^0.1.95",
"lucide-react": "^0.487.0",
"next-themes": "^0.4.6",
"nitropack": "^2.11.13",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"sonner": "^2.0.5",
"tailwind-merge": "^3.3.1",
"tailwindcss": "^4.1.11",
"tw-animate-css": "^1.3.4",
"unenv": "^1.10.0",
"vaul": "^1.1.2",
"vinxi": "^0.5.7",
"zod": "^3.25.67"
},
"devDependencies": {
"@cloudflare/vite-plugin": "^1.7.5",
"@cloudflare/workers-types": "^4.20250627.0",
"@eslint/js": "^9.29.0",
"@tailwindcss/vite": "^4.1.11",
"@tanstack/react-router-devtools": "^1.121.41",
"@tanstack/router-plugin": "^1.121.41",
"@types/node": "24.0.4",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.6.0",
"esbuild": "^0.25.5",
"eslint": "^9.29.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^15.15.0",
"typescript": "5.8.3",
"typescript-eslint": "^8.35.0",
"vite": "^6.3.5",
"vite-tsconfig-paths": "^5.1.4",
"wrangler": "^4.22.0"
}
app.config.ts:
vite.config.ts:
wrangler.toml:
I've been banging my head against this the whole day, with extremely limited success, anyone have an idea what might be wrong?
Ah, forgot to mention, build command is
tsc -b && CLOUDFLARE_ENV=development vite build --mode development
sensitive-blue•3mo ago
which depdency is this?
deep-jadeOP•3mo ago
looks like it's a part of vite - it's from https://github.com/vitejs/vite/blob/ac528a44c384fefb6f10c3f531df93b5ac39324c/packages/vite/src/node/optimizer/index.ts#L800
GitHub
vite/packages/vite/src/node/optimizer/index.ts at ac528a44c384fefb6...
Next generation frontend tooling. It's fast! Contribute to vitejs/vite development by creating an account on GitHub.
deep-jadeOP•3mo ago
but from what I understand, during rollup the
""production""
bit should be replaced dynamically by the actual `mode
passed to vite - I guess?
and something happens somewhere in the chain causing this to fail
this is the actual stack:
sensitive-blue•3mo ago
so you are still on the old vinxi version, right?
but no, this does not make sense
why do you have an app.config.ts ?
deep-jadeOP•3mo ago
F me, I didn't even consider it, it was just there from the project I used as baseline - I deleted it and the build now passes, thank you! ❤️