How are you running Sentry?
Saas (sentry.io)
The following results in the same error:
npx sentry-cli --version
npx sentry-cli@latest releases new -p $PROJECTNAME $RELEASE
Version information, or a new release to be created.
/home/mrm/.npm/_npx/15407/lib/node_modules/sentry-cli/tasks/download.js:72
var progress = log.newItem(url, length);
^
TypeError: log.newItem is not a function
at Request.<anonymous> (/home/mrm/.npm/_npx/15407/lib/node_modules/sentry-cli/tasks/download.js:72:26)
at Request.emit (events.js:200:13)
at Request.onRequestResponse (/home/mrm/.npm/_npx/15407/lib/node_modules/sentry-cli/node_modules/request/request.js:954:10)
at ClientRequest.emit (events.js:205:15)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:565:23)
at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
at Socket.socketOnData (_http_client.js:452:22)
at Socket.emit (events.js:200:13)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node tasks/download.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
? (test for log to not be null?)
$ node -v
v12.4.0
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
$ npx -v
6.13.0
Solution:
Use the correct package, @sentry/cli, rather than sentry-cli, which is decidedly INCORRECT.
Most helpful comment
Solution:
Use the correct package,
@sentry/cli, rather than sentry-cli, which is decidedly INCORRECT.