Hellothere
Hellothere

Reputation: 31

Sveltekit app deployed on Cloudflare Pages causing error on refreshing page after initial load

While running SvelteKit app on CloudFlare Pages, it loads on the first request. When the page is refreshed then it throws an error.

  1. We are using axios in the load() function on Sveltekit to fetch data.
  2. The error in Cloudflare logs is adapter http is not available in build
  3. It works perfectly on Vercel.

Tried to change ENV loading strategy, Host on other platform.

Upvotes: 2

Views: 453

Answers (1)

Hellothere
Hellothere

Reputation: 31

Using fetch instead of axios solved the error.

Upvotes: 1

Related Questions