sentry-react-native: @sentry/cli binary doesn't download (leads to iOS build failure)
Environment os: macOS 12.6 platform: iOS yarn: 1.22.19 react: 17.0.2 react-native: 0.68.2
I created a new React-Native project by running npx react-native init AwesomeProject --version 0.68.0
.
After that, I ran the following commands to install Sentry
.
yarn add @sentry/react-native
npx @sentry/wizard -i reactNative -p ios android
cd ios
pod install
I have the following issue:
Android works well but I see the error while building the iOS app.
Command PhaseScriptExecution failed with a nonzero exit code
Error: spawn /AwesomeProject/node_modules/@sentry/cli/sentry-cli ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn /AwesomeProject/node_modules/@sentry/cli/sentry-cli',
path: '/Volumes/DATA/Project/AwesomeProject/node_modules/@sentry/cli/sentry-cli',
spawnargs: [ 'upload-dsym' ]
}
Command PhaseScriptExecution failed with a nonzero exit code
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (9 by maintainers)
In case some internet searcher comes along in the future…
I’m also using
bun
and I struggled with this for a while. I had the same issue whereinstall.js
was not being triggered and the sentry-cli rust executable was not present. This results in a file not found error in the spawn command which is very cryptic and confusing to debug until you dig into the repo a bit.Not sure what precisely solved it for me, but it works now. Here’s everything I did.
I moved
@sentry/cli
into dependencies from devDependencies and ensured thattrustedDependencies
listed it.Then these commands
@capella55 @jeremyfalldev For some reason the CLI install script didn’t download the CLI binary or didn’t get executed.
Try to execute it manually.