Skip to content

Conversation

@RulaKhaled
Copy link
Member

Issue

The logger was missing from SvelteKit's worker environment exports, causing Sentry.logger to be null when deploying to Cloudflare Pages. Users experienced:

  • Sentry.logger is null in production
  • logger.info() throws access violations
  • Works fine locally but fails in Cloudflare Pages deployment

Cloudflare Pages uses the worker runtime environment (not Node.js) when @sveltejs/adapter-cloudflare is configured which is why logger must be exported from there.

official Cloudflare Pages Functions documentation
https://developers.cloudflare.com/pages/framework-guides/deploy-a-svelte-kit-site/#functions-setup

Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants