sentry-cli: error: sentry-cli was not installed by @sentry/cli install script

Environment

How do you use Sentry? self-hosted/on-premise (Sentry 20.12.1bade073)

Which SDK and version?

"dependencies": {
"@sentry/angular": "^6.2.2",
"@sentry/tracing": "^6.2.2",
}
"devDependencies": {
"@sentry/cli": "^1.63.1",
}
  • node v14.16.0
  • npm 7.6.1

Steps to Reproduce

  1. make commands
SENTRY_CLI=./node_modules/.bin/sentry-cli
sentry-cli releases: create_release upload_sourcemaps

create_release:
	$(SENTRY_CLI) releases -o $(SENTRY_ORG) new -p $(SENTRY_PROJECT) $(VERSION)

associate_commits:
	-$(SENTRY_CLI) releases -o $(SENTRY_ORG) -p $(SENTRY_PROJECT) set-commits --local $(VERSION)

upload_sourcemaps:
	$(SENTRY_CLI) releases -o $(SENTRY_ORG) -p $(SENTRY_PROJECT) files \
		$(VERSION) upload-sourcemaps --url-prefix "~/" --rewrite --validate $(PREFIX)

Expected Result

sentry/cli to upload source maps

Actual Result

error: sentry-cli was not installed by @sentry/cli install script

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 11
  • Comments: 35 (6 by maintainers)

Most upvoted comments

Same problem in windows 10, in scripts/install.js will be check the version number by --version option, but the operation system missing api-ms-win-crt-locale-l1-1-0.dll causes the check to fail, so the installation fails. Just install Visual C++ Redistributable for Visual Studio 2015 will work fine.

In China, add to .npmrc : sentrycli_cdnurl=https://npm.taobao.org/mirrors/sentry-cli

Same here, our react native CI fails with error: sentry-cli was not installed by @sentry/cli install script

Downgrading to the cli version of 1.63.0 seems to help until it’s fixed. It seems that the issue was introduced here: https://github.com/getsentry/sentry-cli/pull/916

@NathanNovak - Uninstall @sentry/react-native, Install @sentry/cli and then Install @sentry/react-native.

npm uninstall @sentry/react-native npm install @sentry/cli@1.63.1 npm install @sentry/react-native@2.3.0 find . -name sentry-cli ./node_modules/.bin/sentry-cli ./node_modules/@sentry/cli/bin/sentry-cli ./node_modules/@sentry/cli/sentry-cli

Same problem in windows 10, in scripts/install.js will be check the version number by --version option, but the operation system missing api-ms-win-crt-locale-l1-1-0.dll causes the check to fail, so the installation fails. Just install Visual C++ Redistributable for Visual Studio 2015 will work fine.

Thanks for the tip @eyasliu, it worked.

You provided the path for the CDN which doesnt exist. You either has SENTRYCLI_CDNURL env variable, sentrycli_cdnurl config in .npmrc or provided sentrycli_cdnurl flag, see: https://github.com/getsentry/sentry-cli#node

Remove them and you’ll be fine. Or be very explicit and call npm install @sentry/cli --sentrycli_cdnurl=https://downloads.sentry-cdn.com/sentry-cli instead

Has anyone figured this out? Seeing it in CircleCI when building for iOS (macOS machine). I’ve tried uninstalling/reinstalling and downgrading versions, but nothing seems to work.

You maybe have old node (10) try updating to 14

@sysmat I had to roll it back to 1.6.0 to get it to run.