Closed mikenikles closed 2 years ago
What's in your vercel.json?
That's my vercel.json
(source code):
{
"version": 2,
"builds": [
{
"src": "package.json",
"use": "vercel-sapper"
}
],
"routes": [
{
"src": "/api/admin/(.*)",
"dest": "https://admin-api.your-analytics.org/$1"
},
{
"src": "/api/query/(.*)",
"dest": "https://query-api.your-analytics.org/$1"
}
]
}
It's quite odd as that exact setup worked in September. When I restarted to work on the project this week, the error showed up.
I'll keep looking into it and report here if I find anything.
The last successful deployment was 23 days ago. No code changes on my end since then. I opened a discussion at https://github.com/vercel/vercel/discussions/5633.
Not sure if helpful, but if your vercel.json is in the root directory, then you can do this:
"builds": [
{
"src": "services/website/package.json",
"use": "vercel-sapper"
}
],
I have not used the Root Directory with vercel-sapper and I'm curious how to enable support..
The vercel-sapper builder unfortunately required a fair bit of wrangling to get things in the right place for Vercel at the time, so it overrides a lot of the build configuration with values which work for Sapper.
As a result, more esoteric build setups such as this one aren't really supported (and I can't use pnpm, either).
Luckily we live in a SvelteKIt world now and as you know, builders are much simpler! I guess that makes this more of a wontfix?
Totally agree. I've migrated multiple Sapper apps to SvelteKit.
Closing as won't fix.
Hi,
I have deployed to Vercel for months, but recently noticed the following error in the Vercel build logs:
My Sapper app is in a sub-directory
services/website
and in the Vercel settings, I set the Root Directory toservices/website
.I tried to move the
vercel.json
file to the root, but that resulted in Vercel build errors sayingexport
is not a directory. Based on that, I assume Vercel ignoredvercel-sapper
and instead tried to use a static Sapper export.Does anyone else run Sapper in a sub-directory and deploy with
vercel-sapper
?Thanks,
Mike