Sentry: `sentry-cli` results in TypeError: log.newItem is not a function

Created on 20 Nov 2019  路  1Comment  路  Source: getsentry/sentry

Important Details

How are you running Sentry?

Saas (sentry.io)

Description

The following results in the same error:

npx sentry-cli --version

npx sentry-cli@latest releases new -p $PROJECTNAME $RELEASE

What you expected to happen

Version information, or a new release to be created.

What actually happened

/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.

Possible Solution

? (test for log to not be null?)

Version information

$ 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

Most helpful comment

Solution:

Use the correct package, @sentry/cli, rather than sentry-cli, which is decidedly INCORRECT.

>All comments

Solution:

Use the correct package, @sentry/cli, rather than sentry-cli, which is decidedly INCORRECT.

Was this page helpful?
0 / 5 - 0 ratings