I am getting this warning in my console for my nextjs
setup:
[@sentry/nextjs] Setting a
sentry
property on the Next.js config is no longer supported. Please use thesentrySDKOptions
argument ofwithSentryConfig
instead.
"@sentry/core": "^8.6.0",
"@sentry/nextjs": "^8.6.0",
Now I am not sure what that means. my next.config.mjs
looks like this:
export default withSentryConfig(nextConfig, {
org: "my-org",
project: "my-project",
authToken: process.env.SENTRY_AUTH_TOKEN,
silent: true,
widenClientFileUpload: true,
hideSourceMaps: true,
disableLogger: true,
automaticVercelMonitors: true,
});
Is that not right?
Your nextConfig
object likely looks something like this:
const nextConfig = {
// some properties...
sentry: {
// ...
}
}
The Sentry SDK v8 no longer uses the sentry
property on nextConfig
and you should pass options directly to withSentryConfig
instead.