-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
10.12.0
Framework Version
15.6.0-canary.12
Link to Sentry event
No response
Reproduction Example/SDK Setup
// str/instrumenation.ts
import * as Sentry from "@sentry/nextjs";
export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
await import("../sentry.server.config");
}
if (process.env.NEXT_RUNTIME === "edge") {
await import("../sentry.edge.config");
}
}
export const onRequestError = Sentry.captureRequestError;
Steps to Reproduce
- Deploy the app on Vercel
- Open any page
Expected Result
No error.
Actual Result
Failed to prepare server Error: An error occurred while loading the instrumentation hook
at ignore-listed frames {
[cause]: Error: Failed to load external module @sentry/nextjs: Error [ERR_REQUIRE_ESM]: require() of ES Module /var/task/node_modules/chalk/source/index.js from /var/task/node_modules/@sentry/nextjs/build/cjs/config/turbopack/constructTurbopackConfig.js not supported.
Instead change the require of index.js in /var/task/node_modules/@sentry/nextjs/build/cjs/config/turbopack/constructTurbopackConfig.js to a dynamic import() which is available in all CommonJS modules.
Additional Context
No response
chargome
Metadata
Metadata
Assignees
Projects
Status
No status