Skip to content

@sentry/cli optional dependencies are not optional #1862

Description

@liamjones

(If you are encountering this issue please 👍 this comment below)

Environment

@sentry/react-native 5.15.1 (w/ @sentry/cli 2.23.0)
Project with optional dependencies excluded from our project for other reasons not related to Sentry (via .yarnrc --install.ignore-optional true)

Steps to Reproduce

Tried to do a build after updating @sentry/react-native from 5.9.1 (w/ @sentry/cli 2.21.3)

Expected Result

iOS builds would work

Actual Result

iOS builds fail

Logs

Xcode build:

Node found at: /usr/local/bin/node
/Users/liam.jones/code/iris/node_modules/@sentry/cli/js/helper.js:116
throw new Error(`Sentry CLI binary for this platform/architecture not found!
^
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.

If they're required dependencies why are they in optional dependencies in the package.json? Something to do with them being platform specific I guess?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions