Skip to content

ERROR Cannot find module '@sentry/utils' breaking Vercel deployments #10429

@mcmxcdev

Description

@mcmxcdev

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/sveltekit

SDK Version

7.98.0

Framework Version

7.98.0

Link to Sentry event

No response

SDK Setup

Sentry.init({
  dsn: PUBLIC_SENTRY_DSN,
  environment: appConfig.settings.reportingEnvironment,
  tracesSampleRate: appConfig.settings.sentrySamplingRate,
  // switching from CaptureConsole class to captureConsoleIntegration leads to breakage 
  integrations: [captureConsoleIntegration({ levels: ['warn', 'error', 'assert'] })],
  enabled: process.env.NODE_ENV === 'production',
})

Steps to Reproduce

We upgraded from 7.91.0 to 7.98.0 today and encountered breaking Vercel deployments:

2024-01-30T19:28:44.383Z	undefined	ERROR	Cannot find module '@sentry/utils'
Require stack:
- /var/task/node_modules/.pnpm/@sentry+integrations@7.98.0/node_modules/@sentry/integrations/cjs/captureconsole.js
- /var/task/node_modules/.pnpm/@sentry+integrations@7.98.0/node_modules/@sentry/integrations/cjs/index.js
2024-01-30T19:28:44.384Z	undefined	ERROR	Did you forget to add it to "dependencies" in `package.json`?
INIT_REPORT Init Duration: 476.37 ms	Phase: invoke	Status: error	Error Type: Runtime.ExitError
Error: Runtime exited with error: exit status 1

The stack trace clearly points to captureconsole.js which made it clear for me that switching from CaptureConsole class to captureConsoleIntegration led to the breakage.

Expected Result

Vercel deployments should work as normal

Actual Result

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions