Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
simontaisne opened this issue Jul 22, 2022 · 3 comments · Fixed by #5473
Closed
3 tasks done

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

simontaisne opened this issue Jul 22, 2022 · 3 comments · Fixed by #5473

Comments

@simontaisne
Copy link

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
@mitchheddles
Copy link

I've created a PR to fix this

@Lms24
Copy link
Member

Lms24 commented Jul 27, 2022

fixed in #5473 (release 7.8.0 will follow soon)

@Lms24 Lms24 closed this as completed Jul 27, 2022
@simontaisne
Copy link
Author

Thank you @mitchheddles, @Lms24! The patch works great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants