$ sudo npm i -g sentry-cli-binary
/usr/local/bin/sentry-cli -> /usr/local/lib/node_modules/sentry-cli-binary/bin/sentry-cli
> [email protected] install /usr/local/lib/node_modules/sentry-cli-binary
> node ./bin/install-sentry-cli
{ Error: EACCES: permission denied, open '/usr/local/lib/node_modules/sentry-cli-binary/bin/../sentry-cli'
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/usr/local/lib/node_modules/sentry-cli-binary/bin/../sentry-cli' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node ./bin/install-sentry-cli`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/djereg/.npm/_logs/2017-09-27T23_22_35_788Z-debug.log
uname -a
Linux he...es 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
node --version
v8.6.0
npm --version
5.4.2
The same command (sudo npm i -g sentry-cli-binary) failed on Mac OS Sierra, but succeeded on Windows 10.
Tried back to 1.13, all failed with same error.
Looks like this might be a generally known issue of installing packages globally with the aptitude npm installation. Could you please have a look at this document and see if it fixes your issue?
Same here, and the link mentioned by @jan-auer doesn't help.
Just noticed that @djereg ran sudo npm install. To be clear, npm is not intended to be run with sudo. Once the permissions are fixed or the node modules folder has been changed as described in the link above, run npm install -g sentry-cli-binary without sudo and it will work.
With permissions fixed as described above, it still doesn't work.
Just to provide an alternative to npm install -g.
If you want to install sentry-cli globally you can install it with this command
curl -sL https://sentry.io/get-cli/ | bash
@aldanor Could you please try with:
sudo npm install -g sentry-cli-binary --unsafe-perm=true
Most helpful comment
@aldanor Could you please try with: