Deploying sveltekit monorepo

I am getting vite: command not found when trying to deploy a sveltekit site part of a bun monorepo. The build command used is bun run build.
2025-01-22T10:07:39.874Z Initializing build environment...
2025-01-22T10:07:49.391Z Success: Finished initializing build environment
2025-01-22T10:07:49.468Z Cloning repository...
2025-01-22T10:07:51.366Z Detected the following tools from environment: [email protected], [email protected]
2025-01-22T10:07:51.367Z Executing user build command: bun run build
2025-01-22T10:07:51.633Z $ vite build
2025-01-22T10:07:51.635Z /usr/bin/bash: line 1: vite: command not found
2025-01-22T10:07:51.639Z error: script "build" exited with code 127
2025-01-22T10:07:51.641Z Failed: error occurred while running build command
2025-01-22T10:07:39.874Z Initializing build environment...
2025-01-22T10:07:49.391Z Success: Finished initializing build environment
2025-01-22T10:07:49.468Z Cloning repository...
2025-01-22T10:07:51.366Z Detected the following tools from environment: [email protected], [email protected]
2025-01-22T10:07:51.367Z Executing user build command: bun run build
2025-01-22T10:07:51.633Z $ vite build
2025-01-22T10:07:51.635Z /usr/bin/bash: line 1: vite: command not found
2025-01-22T10:07:51.639Z error: script "build" exited with code 127
2025-01-22T10:07:51.641Z Failed: error occurred while running build command
Has anyone encountered this issue?
{
"name": "monorepo",
"version": "1.0.0",
"private": true,
"workspaces": [
"packages/*",
"apps/*"
]
}
{
"name": "monorepo",
"version": "1.0.0",
"private": true,
"workspaces": [
"packages/*",
"apps/*"
]
}
This is the monorepo package.json
7 Replies
apolodoro
apolodoroOP7d ago
And this is the app package.json
Ahz
Ahz7d ago
try running the build cmd locally to get more detail where why it failed
apolodoro
apolodoroOP7d ago
It does not fail locally I can build and deploy to cloudflare locally the problem is when cloudflare has to run the build
Ahz
Ahz7d ago
doesnt look like the install is happening for bun before the build
apolodoro
apolodoroOP7d ago
Should i specify anything other than bun run build for the cloudflare build command?
Ahz
Ahz6d ago
no idea, i dont use bun
apolodoro
apolodoroOP12h ago
@DaniFoldi sorry for the ping but im not sure how to ask for help since no one from the team apparently saw this thread...

Did you find this page helpful?