Rastislav₡ore
CDCloudflare Developers
•Created by Rastislav₡ore on 11/29/2024 in #pages-help
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!2 replies
CDCloudflare Developers
•Created by Rastislav₡ore on 9/16/2024 in #pages-help
Compatibility flags for PosgreSQL
I am trying to build and deploy SvelteKit page with enabled flags:
nodejs_compat
or nodejs_compat_v2
https://developers.cloudflare.com/workers/configuration/compatibility-dates/#compatibility-flags
I am using Drizzle connector, but seems I run always into node compatibility issues, which are present on native postgres.js
also.
Connectors are present in Hyperdrive: https://developers.cloudflare.com/hyperdrive/configuration/connect-to-postgres/#supported-drivers
Source code: https://github.com/bchainhub/dapp-sveltekit-boilerplate/tree/update/contrib-13
My questions:
Q1: Do I need to upgrade to paid plan for Node.js features support? (I am aware of Hyperdrive included in Paid plan)
Q2: What should I change to make Node.js API working on my Pages deployment?
Some of errors I am getting while deployment:
- page: core-dapp.pages.dev
- deployment: 580ce1e
I checked the examples here also: https://developers.cloudflare.com/hyperdrive/examples/28 replies