After deployment, can't access website
My page: https://svelte-cfpage.pages.dev/
My deployment ID: (I don't know how to get it)
My account ID: 80a06574599d689bb015dc39791e5f22
I don't get any errors. My main problem is that I succcesfully deployed (built) my website from a GitHub repo. After this I don't know what I should do to be able to access my website.
24 Replies
.
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)
Yeah, it showed that, and the URL was also something like that, but for some reason when I tried to open it, it said that it doesn't exist
https://4facad8c.svelte-cfpage.pages.dev/
Oh wait..
![No description](https://cdn.answeroverflow.com/1166315612218327110/Screenshot_2023-10-24-12-01-09-044_com.android.chrome-edit.jpg)
For some reason it only uploaded 1 file
How can I fix that?
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
?The directories match. I didn't push the built files to GitHub, I thought CF would build it. I guess that is the problem, right?
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
(I’m pulling that command out of nowhere, I don’t know Svelte specifically)On my local computer I can build it with
npm run build
.This is my build settings:
![No description](https://cdn.answeroverflow.com/1166318096433299476/Screenshot_2023-10-24-12-11-11-103_com.android.chrome-edit.jpg)
This is my GH repo:
https://github.com/sharkmu/svelte-cfpage
GitHub
GitHub - sharkmu/svelte-cfpage
Contribute to sharkmu/svelte-cfpage development by creating an account on GitHub.
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
Deploy a Svelte site · Cloudflare Pages docs
Svelte is an increasingly popular, open-source framework for building user interfaces and web applications. Unlike most frameworks, Svelte is …
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.🤔
Interesting
![No description](https://cdn.answeroverflow.com/1166321663047118960/Screenshot_2023-10-24-12-25-29-414_com.android.chrome-edit.jpg)