-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account (N/A)
Package + Version
-
@sentry/browser -
@sentry/node -
raven-js -
raven-node(raven for node) - other:
@sentry/nextjs
Version:
6.3.4
Description
I've just set up @sentry/nextjs on our Next app, but I'm having an issue with the client side implementation as it seems sentry.client.config.js doesn't have access to runtime config. It looks like getConfig() from next/config is undefined when Sentry initialises on the client.
We need to use publicRuntimeConfig because our app is built once but deployed across multiple environments, so we don't have the environment name at build time.
Minimal reproduction: CodeSandbox
(NB. I set the withSentryConfig option silent: false to prevent my auth token being logged to console, even though it's just a test organisation!). Note the page is blank, and looking in the dev tools console (not the codesandbox console, the actual browser one) shows the error in question.