I have a turborepo with several sveltekit web apps in it. I am using caching. If one of my web apps is triggered for deployment by a repo change, and it gets a 100% turborepo cache, I get this 404 page:
When I turn on directory listing, just to see whats in the directory, I see this:
And this is my vercel deployment configuration for the app:
The web app itself is this one - https://github.com/cozemble/monorepo/tree/main/frontend/ai-playground , so you can see all my configuration files.
When a deployment to this app is triggered by a change to the app itself (meaning turborepo caching does not happen) then it deploys fine.
Update 1 in reponse to the question from @paulogdm
, if I remove the Output Directory
override, and restore it back to public
, I get this deployment error when I deploy a fully cached turborepo build:
Ok, it looks like there are two parts to fixing this:
Output Directory
override I did, so it defaults back to public
turbo.json
. Mine now looks like this:{
"$schema": "https://turborepo.org/schema.json",
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", "package/**", ".svelte-kit/**", ".vercel/**"]
},
"test": {
"dependsOn": ["build"],
"outputs": [],
"inputs": []
},
"cypress": {
"dependsOn": ["build", "test"],
"inputs": ["cypress/**"],
"outputs": []
}
}
}
Super non-obvious, but there you go.