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/10 Replies
i just ran into this exact same error (using sveltekit + postgres.js). were you able to resolve it?
@vytskalt so far no solution. Seems this is serious bug on side of Cloudflare. I am trying to resolve with Drizzle ORM but same issues. I will update here if some news will occur. @Community Champion should I report bug? If yes, where?
?pings
Please do not ping community members for non-moderation reasons. Doing so will not solve your issue faster and will make people less likely to want to help you.
Oh sorry, didn't know. I will found out myself.
@vytskalt Sent to support. When I will get any reply, I will reveal solution here.
Similar error related for Next.js is here: https://discord.com/channels/595317990191398933/1287862192712192113
One additional note to the topic:
- I have paid pages/workers plan
- Hyperdrive is available for me
No other updates so far about the topic.
Im having this exact issue too after implementing svelte, but im not using sveltekit
My
ResponseCode.ts
and the token.ts
file thats throwing the error
It specifically targets the ResponseCode.ts
file for some reason and I have no idea why
EventContext.ts
is in the same directory as @base
I think the issue is not related to framework, because I am aware of issues for React also. You may be in same category as us. I am still waiting for support team to answer. Seems no really priority to them. I will recommend you will raise support ticket as well, it may be faster answer for you. I will appreciate sharing any feedback from you @Register Thank you for contributing to thread.
Actually we fixed it
It was an issue with our tsconfig
Reply from the Cloudflare support:
Please consider the following recommendations:
1. Change the NODE_VERSION to v18.
2. Set the compatibility date to the current date.