Skip to content

disableLogger deprecation warning from @sentry/nextjs #17763

@wackerow

Description

@wackerow

Description

Running pnpm dev produces the following deprecation warning in the console:

[@sentry/nextjs] DEPRECATION WARNING: disableLogger is deprecated and will be removed in a future version. Use webpack.treeshake.removeDebugLogging instead.

Root Cause

In next.config.js, the withSentryConfig call uses the now-deprecated disableLogger option:

// next.config.js (line 228)
module.exports = withSentryConfig(module.exports, {
  org: "ethereumorg-ow",
  project: "ethorg",
  silent: true,
  widenClientFileUpload: true,
  disableLogger: true,        // <-- deprecated
  automaticVercelMonitors: true,
})

Suggested fix

Replace disableLogger: true with the new webpack.treeshake.removeDebugLogging option per the Sentry migration guidance:

module.exports = withSentryConfig(module.exports, {
  org: "ethereumorg-ow",
  project: "ethorg",
  silent: true,
  widenClientFileUpload: true,
  webpack: {
    treeshake: {
      removeDebugLogging: true,
    },
  },
  automaticVercelMonitors: true,
})

Environment

  • @sentry/nextjs: ^10.41.0
  • Next.js: 14.2+
  • Node: (your version here)

Note: Suggest verifying against the Sentry migration docs for v10+ before applying, as the exact nested key path may vary.


cc: @pettinarip

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triage 📥This issue needs triaged before being worked ontooling 🔧Changes related to tooling of the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions