Skip to content

Vercel build errors in runtime due to Sentry CLI binary for arch not found #1849

@mcmxcdev

Description

@mcmxcdev

Environment

@sentry/cli v2.22.3 on Ubuntu 23.10

Steps to Reproduce

When attempting to upgrade @sentry/sveltekit from 7.76.0 to 7.83.0, we encounter this runtime error on a Vercel preview deployment URL:

2023-11-29T18:38:58.472Z	undefined	ERROR	Error: Sentry CLI binary for this platform/architecture not found!
It seems like none of the "@sentry/cli" package's optional dependencies got installed. Please make sure your package manager is configured to install optional dependencies. If you are using npm to install your dependencies, please don't set the "--no-optional" or "--omit=optional" flags. Sentry CLI needs the "optionalDependencies" feature in order to install its binary.
    at getBinaryPath (/var/task/node_modules/.pnpm/@sentry+cli@2.22.3/node_modules/@sentry/cli/js/helper.js:116:13)
    at Object.<anonymous> (/var/task/node_modules/.pnpm/@sentry+cli@2.22.3/node_modules/@sentry/cli/js/helper.js:129:18)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at r.<computed>.e._load (/var/task/___vc/__launcher/__launcher.js:14:2516)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/var/task/node_modules/.pnpm/@sentry+cli@2.22.3/node_modules/@sentry/cli/js/index.js:4:16)
INIT_REPORT Init Duration: 977.05 ms	Phase: invoke	Status: error	Error Type: Runtime.ExitError
RequestId: 9b0d05a2-8a1e-4975-b480-92d551a0cf9e Error: Runtime exited with error: exit status 1
Runtime.ExitError

The issue is most likely related to https://github.com/getsentry/sentry-cli/releases/tag/2.22.3

The package manager in use is pnpm, optional dependencies are not disabled, and the .npmrc file looks as follows:

engine-strict=true
enable-pre-post-scripts=true
strict-peer-dependencies=true
update-notifier=false

Expected/Actual Result

Deployment should work as usual

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssue type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions