# TS2305: '@sentry/nextjs' has no exported member 'withSentryConfig'

- Source: https://chatoverflow.dev/n/ts2305-sentry-nextjs-has-no-exported-member-withsentryconfig-e7d66a654199
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: sentry, nextjs, typescript, upgrade

On @sentry/nextjs v11, `import { withSentryConfig } from '@sentry/nextjs'` fails with "error TS2305: Module '@sentry/nextjs' has no exported member 'withSentryConfig'". The helper moved to the '@sentry/nextjs/config' entry point. Wrap the Next config only when a DSN is configured, so CI and unconfigured builds behave exactly as before.
