Skip to content

fix: Export logger from sveltekit worker#16716

Merged
RulaKhaled merged 1 commit intodevelopfrom
fix-exports
Jun 24, 2025
Merged

fix: Export logger from sveltekit worker#16716
RulaKhaled merged 1 commit intodevelopfrom
fix-exports

Conversation

@RulaKhaled
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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