Skip to content

Warning when using hideSourceMaps option in next.config.js #5449

Closed
@simontaisne

Description

@simontaisne

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/nextjs

SDK Version

7.7.0

Framework Version

12.2.3

Link to Sentry event

No response

Steps to Reproduce

  1. Configure Sentry automatically with Next.js with the wizard
  2. Use hidden-source-map by setting the hideSourceMaps option in next.config.js
const moduleExports = {
  sentry: {
    hideSourceMaps: true,
  },
};
  1. Run next dev to start Next.js in development mode

Expected Result

Run Next.js with Sentry without any warning.

Actual Result

Since the introduction of the next.config.js validation via ajv on version 12.2.3, the following warning is raised.

warn  - Invalid next.config.js options detected: 
[
  {
    "instancePath": "",
    "schemaPath": "#/additionalProperties",
    "keyword": "additionalProperties",
    "params": {
      "additionalProperty": "sentry"
    },
    "message": "must NOT have additional properties"
  }
] 
See more info here: https://nextjs.org/docs/messages/invalid-next-config

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nextjsIssues related to the Sentry Nextjs SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions