We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
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
Sentry Saas (sentry.io)
@sentry/nextjs
9.14.0
Next 14.2.6
No response
import * as Sentry from '@sentry/nextjs'; Sentry.init({ tracesSampleRate: 1, debug: false, });
I installed sentry using the wizard.
It should compile the code properly.
Getting error during compilation of instrumentation.ts file in nextjs.
./node_modules/.pnpm/[email protected][email protected]/node_modules/debug/src/node.js Module not found: ESM packages (supports-color) need to be imported. Use 'import' to reference the package instead. https://nextjs.org/docs/messages/import-esm-externals Import trace for requested module: ./node_modules/.pnpm/[email protected][email protected]/node_modules/debug/src/node.js ./node_modules/.pnpm/[email protected][email protected]/node_modules/debug/src/index.js ./node_modules/.pnpm/[email protected][email protected]/node_modules/require-in-the-middle/index.js ./node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/instrumentation.js ./node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/index.js ./node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@opentelemetry/instrumentation/build/esm/platform/index.js ./node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@opentelemetry/instrumentation/build/esm/index.js ./node_modules/.pnpm/@[email protected][email protected]/node_modules/@sentry/node/build/cjs/otel/instrument.js ./node_modules/.pnpm/@[email protected][email protected]/node_modules/@sentry/node/build/cjs/index.js ./node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]._0955db245e18b83c766d7b3c2cf636ed/node_modules/@sentry/nextjs/build/cjs/index.server.js ./sentry.server.config.ts
The text was updated successfully, but these errors were encountered:
Hey @kulterryan thanks for reaching out.
Looks like debug is requiring supports-color, that's why you are running into https://nextjs.org/docs/messages/import-esm-externals (because it expects it to imported).
supports-color
Seems not to be related to the Sentry SDK but I would try some of the following:
experimental.esmExternals: 'loose'
Sorry, something went wrong.
No branches or pull requests
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
9.14.0
Framework Version
Next 14.2.6
Link to Sentry event
No response
Reproduction Example/SDK Setup
Steps to Reproduce
I installed sentry using the wizard.
Expected Result
It should compile the code properly.
Actual Result
Getting error during compilation of instrumentation.ts file in nextjs.
The text was updated successfully, but these errors were encountered: