Skip to content

feat(npm): Add support for installing npm package on Android #2524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2025

Conversation

szokeasaurusrex
Copy link
Member

Android systems should be able to run the Linux binary. This change enables the Linux binary to be fetched when the npm package is installed on an Android system.

Fixes #2288

Verified

This commit was signed with the committer’s verified signature.
szokeasaurusrex Daniel Szoke
Android systems should be able to run the Linux binary. This change enables the Linux binary to be fetched when the `npm` package is installed on an Android system.

Fixes #2288
@szokeasaurusrex
Copy link
Member Author

I tested this change by installing the commit via npm on an Android emulator. While the installation was successful, I received this warning message during installation:

[sentry-cli] Sentry CLI failed to locate the "@sentry/cli-linux-arm64" package after installation!

This can happen if you use an option to disable optional dependencies during installation, like "--no-optional", "--ignore-optional", or "--omit=optional". Sentry CLI uses the "optionalDependencies" package.json feature to install the correct binary for your platform and operating system. This post-install script will now try to work around this by manually downloading the Sentry CLI binary from the Sentry CDN. If this fails, you need to remove the "--no-optional", "--ignore-optional", and "--omit=optional" flags for Sentry CLI to work.

I believe this is occurring because the changes to the package.json for the optional dependencies are not reflected in npm yet, and npm does not know to look for them in this repo. So, in order to fully test this, I will make an alpha for the next release and try installing the alpha (from npm directly).

@szokeasaurusrex szokeasaurusrex enabled auto-merge (squash) May 27, 2025 13:36
@szokeasaurusrex szokeasaurusrex merged commit 699aca9 into master May 27, 2025
18 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/android-npm-support branch May 27, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install: support android platform
2 participants