-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
10.36.0
Framework Version
Next 16.1.5
Link to Sentry event
No response
Reproduction Example/SDK Setup
https://github.com/Tadimsky/sentry-issue-debugIds
Steps to Reproduce
Run:
- yarn install
- next build
- next build
Expected Result
The second build to complete successfully.
Actual Result
The Sentry debugId injection is persisted to the files in node_modules and causes the build to fail:
./node_modules/apollo-upload-client/createUploadLink.mjs:302:2
Type error: An expression of type 'void' cannot be tested for truthiness.
300 | * the extractable file matcher extracts.
301 | */
> 302 | !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cfac0905-0a13-5f87-8f3f-4c32b28fa961")}catch(e){}}();
| ^
303 | //# debugId=cfac0905-0a13-5f87-8f3f-4c32b28fa961
304 |
Next.js build worker exited with code: 1 and signal: null
Additional Context
We're disabling the sourcemap functionality in local development but when we do this, we now get the debugId injection appending to files in node_modules after the first build.
This causes a compile-time error, so we cannot run tsc or next build again. This happens both locally and in CI (which is worse as our node_modules get cached).
For some reason, these files are being mutated?
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Metadata
Metadata
Assignees
Projects
Status