Skip to content

Critical Dependency Warning After Upgrading to @sentry/nextjs v8 #12077

Description

@saraluk

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

8.1.0

Framework Version

next 14.2.3

Link to Sentry event

No response

SDK Setup

Sentry.init({
  dsn: "change me",
  tracesSampleRate: 1,
  debug: false,
  integrations: [
    Sentry.feedbackIntegration({
      autoInject: false,
    }),
  ],
});

Steps to Reproduce

Upgrade @sentry/nextjs from v7.113.0 to v8.1.0 and run the project build process

Expected Result

The build process should complete without warnings related to critical dependencies.

Actual Result

After upgrading to @sentry/nextjs version 8, I encountered the following warning in the build logs:

⚠ ./node_modules/@prisma/instrumentation/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/instrumentation.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/@prisma/instrumentation/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/instrumentation.js
./node_modules/@prisma/instrumentation/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/index.js
./node_modules/@prisma/instrumentation/node_modules/@opentelemetry/instrumentation/build/esm/platform/index.js
./node_modules/@prisma/instrumentation/node_modules/@opentelemetry/instrumentation/build/esm/index.js
./node_modules/@prisma/instrumentation/dist/chunk-64MZJIQ5.js
./node_modules/@prisma/instrumentation/dist/index.js
./node_modules/@sentry/node/cjs/integrations/tracing/prisma.js
./node_modules/@sentry/node/cjs/index.js
./node_modules/@sentry/nextjs/cjs/index.server.js
./app/global-error.tsx

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions