-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
posthog-node@4.5 breaks build on SvelteKit for Cloudflare #395
Comments
@PostHog/team-error-tracking |
Thanks for the report! It looks like cloudflare workers aren't a nodejs compatible runtime by default, and you'll need to turn on the nodejs_compat flag in order to use npm packages designed for use with the nodejs runtime. Based on cloudflares compatibility matrix, with this flag enabled, the imports listed should be supported. |
I have this compatibility_date = "2024-11-11"
compatibility_flags = [ "nodejs_compat" ] However, I've found out that with adapter-cloudflare@4.9.0 it doesn't build, but it does @5.0.3. Anyway, it works for me now. Thanks! |
Hm, maybe I closed it prematurely...
But I'm not sure what the problem is, could be a bug on CF as well. |
Bug description
How to reproduce
npm run build
Related sub-libraries
Additional context
Version 4.4.1 worked just fine.
The text was updated successfully, but these errors were encountered: