Skip to content

sfdx-cli@7.46.1 will not install from npm, Cannot read property 'match' of undefined #304

@egroenen

Description

@egroenen

Summary

sfdx-cli from npm is failing to install at latest version, which is breaking CI/CD pipelines.

The following command will fail from a virgin node latest docker:

shell% npm install sfdx-cli --global

Steps To Reproduce:

  1. docker run -it node:13.8.0-alpine3.10 /bin/ash
  2. npm install sfdx-cli --global
  3. sfdx fails to install

Expected result

  1. docker run -it node:13.8.0-alpine3.10 /bin/ash
  2. npm install sfdx-cli --global
  3. sfdx installs

Actual result

2465 http fetch GET 200 https://registry.npmjs.org/@salesforce/command/-/command-1.5.0.tgz 73ms
2466 silly pacote version manifest for @salesforce/command@1.5.0 fetched in 78ms
2467 timing stage:rollbackFailedOptional Completed in 0ms
2468 timing stage:runTopLevelLifecycles Completed in 45418ms
2469 verbose stack TypeError: Cannot read property 'match' of undefined
2469 verbose stack     at tarballToVersion (/usr/local/lib/node_modules/npm/lib/install/inflate-shrinkwrap.js:87:20)
2469 verbose stack     at inflatableChild (/usr/local/lib/node_modules/npm/lib/install/inflate-shrinkwrap.js:99:22)
2469 verbose stack     at /usr/local/lib/node_modules/npm/lib/install/inflate-shrinkwrap.js:55:12
2469 verbose stack     at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
2469 verbose stack     at Object.gotValue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/reduce.js:155:18)
2469 verbose stack     at Object.gotAccum (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/reduce.js:144:25)
2469 verbose stack     at Object.tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
2469 verbose stack     at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:517:31)
2469 verbose stack     at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:574:18)
2469 verbose stack     at Promise._settlePromiseCtx (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:611:10)
2469 verbose stack     at _drainQueueStep (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:142:12)
2469 verbose stack     at _drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:131:9)
2469 verbose stack     at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:147:5)
2469 verbose stack     at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
2469 verbose stack     at processImmediate (internal/timers.js:456:21)

Workarounds

  1. install the previous version of sfdx: npm install sfdx-cli@7.45.1 --global
  2. Use yarn

Additional information

SFDX CLI Version(to find the version of the CLI engine run sfdx --version):

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)

OS and version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions