Sentry-react-native: error: failed to invoke sentry-cli

Created on 3 Jan 2018  ยท  10Comments  ยท  Source: getsentry/sentry-react-native

OS:

  • [ ] Windows
  • [x] MacOS
  • [ ] Linux

_Platform:_

  • [x] iOS
  • [ ] Android

Output of node -v && npm -v && npm ls --prod --depth=0

v8.9.3
5.5.1
[email protected] /Users/kdong/react-native-app
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected] invalid
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ””โ”€โ”€ [email protected]

I got this when building in Xcode

error: failed to invoke sentry-cli
Error: spawn /Users/kdong/react-native-app/node_modules/@sentry/cli/sentry-cli ENOENT
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:678:11)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3

Most helpful comment

We had this error in CI because we install dependencies with npm ci --ignore-scripts and sentry depends on an install time script to setup the binary.

All 10 comments

Hey, can you check your node_modules folder if there is are these folders?

@sentry
โ”œ--- cli
โ””--- wizard

Did you install react-native-sentry with yarn or with npm?

@HazAT I have the same problem, I install this package with yarn, this one doesn't rename "sentry-cli-binary" folder to "@sentry" in node_modules, it works with npm

Can you please completely remove the node_modules folder clear your npm cache and make a fresh clean install?

I already done it, this package works great when the installation is made from npm, but not when yarn is used, because as I say with yarn the directory "sentry-cli-binary" is not renamed in "@sentry"

what version of yarn are you running?
And did you remove the yarn lockfile and cleaned the yarn cache?

I use yarn v0.20.3
I just try to remove the cache, it works, it seams to be the problem :) Thanks!

OK, I suppose @kdong007 will have the same problem.
I am closing this for now.

We had this error in CI because we install dependencies with npm ci --ignore-scripts and sentry depends on an install time script to setup the binary.

Any update ??? i am facing this issue

We were facing the same issue, in the end it was also the --ignore-scripts issue as stated by @mmeylan, since we also use a mono-repo the solution became something like this:

yarn --ignore-scripts
cd example/ios
pod instsall
cd ../..
rm -rf node_modules
yarn

and also clearing the packager might have helped

rm -rf $TMPDIR/react-*; rm -rf $TMPDIR/haste-*; rm -rf $TMPDIR/metro-*; watchman watch-del-all; react-native start -- --reset-cache;
Was this page helpful?
0 / 5 - 0 ratings