QuaqSim
QuaqSim
CDCloudflare Developers
Created by Gameoholic on 10/29/2023 in #pages-help
Setting up sub-domain
I’ve seen this happen in Safari, where it can be infuriating because it also hides www. in the address bar, so it’s really easy to keep seeing subsequent errors because of not noticing that. Maybe the behaviour comes from WebKit which would affect Chrome as well. I think that when interacting with the domain fails in certain ways, it tries prefixing www.. I suspect when you use https://, i.e. explicitly use HTTPS, it disables that behaviour for security reasons.
28 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
It looks pretty straightforward, an npm install, a minor change to switch the adapter and changing the build configuration as shown a little further down. (Your root directory will need to remain as-is.)
36 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
The comments in svelte.config.js for the adapter talk about adapter-auto only supporting some environments and to change it if necessary - I assume Cloudflare is one of the environments it doesn't support and so is necessary to change it.
36 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
Also probably means you'll need to complete the setup from my previous link, which also describes the build configuration to use.
36 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
Ah, that'll be why then. It looks like you're using SvelteKit based on vite.config.js, which probably means it's building into a .svelte-kit directory or subdirectory.
36 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
When you run npm run build locally, are the files you want to upload created in dist?
36 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
In retrospect, the output directory will be relative to the current working directory, which is changed by root directory. Sorry about that.
36 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
Though looking at that again, I wonder if /dist should be /cfpage/dist, i.e. if it’s building inside there rather than beside it.
36 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
Looks like there is some extra setup needed for Svelte like installing and using a different adapter: https://developers.cloudflare.com/pages/framework-guides/deploy-a-svelte-site#sveltekit-cloudflare-configuration
36 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
(I’m pulling that command out of nowhere, I don’t know Svelte specifically)
36 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
Shouldn’t be, but it would need to be configured to perform the build if it isn’t already. E.g. build command might need to be something like npx svelte build
36 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
Do the build directories match in your project? (Configuration in the dashboard, I think) E.g. if Svelte puts its results into build, does your Pages project use build?
36 replies
CDCloudflare Developers
Created by samsam on 10/23/2023 in #pages-help
After deployment, can't access website
If you look at deployments for the Pages project in Cloudflare, does it list a deployment around the time you would expect? If so, does accessing that deployment specifically show what you expect? (URL should look something like https://a1b2c3.svelte-cfpage.pages.dev)
36 replies