Open
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
8.40.0
Framework Version
Next 15.0.4-canary.28
Link to Sentry event
No response
Reproduction Example/SDK Setup
Any Next.js 15 + Sentry 8.40.0 template/basic application deployed to Vercel.
Steps to Reproduce
- npx create-next-app --example with-sentry nextjs-sentry-example
- Ensure
[email protected]
installed - Build project locally (Build should pass)
- Deploy project to Vercel (Build should fail)
- Downgrade to
[email protected]
- Deploy project to Vercel (Build should pass)
Expected Result
Build should pass in Vercel
Actual Result
unhandledRejection Error: require() of ES Module /vercel/path0/node_modules/chalk/source/index.js from /vercel/path0/node_modules/@sentry/nextjs/build/cjs/config/webpack.js not supported.
Instead change the require of index.js in /vercel/path0/node_modules/@sentry/nextjs/build/cjs/config/webpack.js to a dynamic import() which is available in all CommonJS modules.
at mod.require (node_modules/next/dist/server/require-hook.js:65:28)
at Object.<anonymous> (../../node_modules/@sentry/nextjs/build/cjs/config/webpack.js:12:15) {
type: 'Error',
code: 'ERR_REQUIRE_ESM'
}
error: script "build" exited with code 1
Error: Command "bun run build" exited with 1
Metadata
Assignees
Type
Projects
Status
No status
Activity