You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to deploy a website built with SvelteKit to GitHub Pages.
The whole site is SSG only and I have no issue with pnpm dev, pnpm build or pnpm serve locally.
However, it seems that that the GitHub Actions CI keeps on throwing the same error: Error: 404 / does not begin with 'base':
What is surprising is that I cannot reproduce the issue, even when using the same environment variables, and it makes me wondering if that's something internal to SvelteKit that is throwing this.
I am clueless as what I'm supposed to do, as all my paths are starting with this prefix (I also noticed the docs recommending to use resolve(...) but this fails too).
I attempted:
Downgrading the pnpm version in my build script
Use {base} and resolve(...) without success
Write a custom +error.svelte as I was wondering if the default error page was the issue (it wasn't)
Ask several AI agents, that were unable to find it either
I'm a completely out of idea, does anyone has a new one I havn't tried yet?
If that's of any help, the repo is the following: https://github.com/pBouillon/locutionis
EDIT: I've silenced the error with:
kit: {adapter: adapter(),paths: {base: process.env.NODE_ENV==='production' ? '/locutionis/' : '/'},prerender: {handleHttpError: ({ path, referrer, message })=>{constisBasePathError=path==='/'&&message.includes('does not begin with `base`');if(isBasePathError){return;}thrownewError(message);}}},
but it doesn't seems like the good way of addressing the issue
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I'm attempting to deploy a website built with SvelteKit to GitHub Pages.
The whole site is SSG only and I have no issue with
pnpm dev
,pnpm build
orpnpm serve
locally.However, it seems that that the GitHub Actions CI keeps on throwing the same error:
Error: 404 / does not begin with 'base'
:With this job:
What is surprising is that I cannot reproduce the issue, even when using the same environment variables, and it makes me wondering if that's something internal to SvelteKit that is throwing this.
I am clueless as what I'm supposed to do, as all my paths are starting with this prefix (I also noticed the docs recommending to use
resolve(...)
but this fails too).I attempted:
{base}
andresolve(...)
without success+error.svelte
as I was wondering if the default error page was the issue (it wasn't)My
svelte.config.js
is the following:I'm a completely out of idea, does anyone has a new one I havn't tried yet?
If that's of any help, the repo is the following: https://github.com/pBouillon/locutionis
EDIT: I've silenced the error with:
but it doesn't seems like the good way of addressing the issue
Beta Was this translation helpful? Give feedback.
All reactions