Deployment Issues on Cloudflare Pages with SvelteKit 5
We are encountering issues while deploying two separate SvelteKit 5 projects to Cloudflare Pages. The build process fails with errors related to resolving component paths or modules. Here are the details of the issues:
1. Project 1: DApp SvelteKit Boilerplate
Error:
The
Error:
Similar to the first project, the
Error:
The
index.ts
exports components from specific folders, such as export { Icon } from './icon';
, but the PWA plugin cannot resolve the path despite no issues in local development.
2. Project 2: PayToError:
Similar to the first project, the
index.ts
files structure components, and the issue arises when the PWA plugin fails to resolve paths during the Cloudflare build process.
Both projects work correctly in local environments, including full SSR builds, but they consistently fail on Cloudflare Pages. Key configurations such as vite.config.ts
, TypeScript type definitions, and component structures have been verified, and Cloudflare-specific configurations (e.g., wrangler.toml
) align with the projects’ requirements.
Questions for the Community:
1. Are there known limitations or nuances with the vite-plugin-pwa
or Rollup on Cloudflare Pages that could be causing these resolution issues?
2. Could the problem be related to the wrangler.toml
setup, Cloudflare's filesystem structure, or case sensitivity in component folder names?
3. Is there a recommended debugging approach to further isolate issues specific to Cloudflare’s environment?
Any insights or similar experiences would be greatly appreciated!1 Reply
Seems like more serious, came to this:
Failed: an internal error occurred. If this continues, contact support: https://cfl.re/3WgEyrH