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
- 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)
Same problem in windows 10, in
scripts/install.jswill be check the version number by--versionoption, but the operation system missingapi-ms-win-crt-locale-l1-1-0.dllcauses 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-cliSame here, our react native CI fails with
error: sentry-cli was not installed by @sentry/cli install scriptDowngrading to the cli version of
1.63.0seems 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
Thanks for the tip @eyasliu, it worked.
You provided the path for the CDN which doesnt exist. You either has
SENTRYCLI_CDNURLenv variable,sentrycli_cdnurlconfig in.npmrcor providedsentrycli_cdnurlflag, see: https://github.com/getsentry/sentry-cli#nodeRemove them and you’ll be fine. Or be very explicit and call
npm install @sentry/cli --sentrycli_cdnurl=https://downloads.sentry-cdn.com/sentry-cliinsteadHas 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.