Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/nextjs
SDK Version
7.29.0
Framework Version
@sentry/[email protected]
Link to Sentry event
No response
Steps to Reproduce
- run
yarn add -D @sentry/nextjs
- have a
next.config.js
exporting a function
const { withSentryConfig } = require('@sentry/nextjs')
// see https://nextjs.org/docs/api-reference/next.config.js/introduction
module.exports = (phase, { defaultConfig }) => {
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
/* config options here */
}
return withSentryConfig(defaultConfig)
}
1 .
see warns
warn - Invalid next.config.js options detected:
- The root value must be an object but it was a function.
See more info here: https://nextjs.org/docs/messages/invalid-next-config
warn - Detected next.config.js, no exported configuration found. https://nextjs.org/docs/messages/empty-configuration
info - automatically enabled Fast Refresh for 1 custom loader
^C%
Expected Result
the next.config.js
file should be read as without errors
Actual Result
window.NEXT_DATA.runtimeConfig is missing