1

I am getting the following error after attempting to run the following command to push some code to a new scratch org:

sfdx force:source:push -u tb-prototype --dev-debug

Error message:

  ERROR running force:source:push:  version.match is not a function 
*** Internal Diagnostic ***

TypeError: version.match is not a function
    at MdapiPackage.setVersion (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/source/mdapiPackage.js:111:25)
    at new MdapiPackage (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/source/mdapiPackage.js:103:14)
    at generateMetadataManifestJson (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/source/manifestCreateApi.js:39:23)
    at manifestCreate.createManifest (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/source/manifestCreateApi.js:166:33)
    at Function.createPackageManifests (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/source/sourceConvertApi.js:220:14)
    at /usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/source/sourceConvertApi.js:119:37
    at async MdapiPushApi.doDeploy (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/source/sourcePushApi.js:47:32)
From previous event:
    at processImmediate (internal/timers.js:456:21)
From previous event:
    at SourceApiCommand.execute (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/source/sourceApiCommand.js:52:14)
    at SourcePushCommand.execLegacyCommand (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/ToolbeltCommand.js:148:43)
    at async SourcePushCommand.run (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/commands/force/source/push.js:25:16)
    at async SourcePushCommand._run (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/node_modules/@salesforce/command/lib/sfdxCommand.js:91:40)
    at async Config.runCommand (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/config/lib/config.js:172:9)
    at async Main.run (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/main.js:22:9)
    at async Main._run (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Object.run (/usr/local/lib/node_modules/sfdx-cli/dist/cli.js:32:20)
Outer stack:
    at Function.wrap (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/node_modules/@salesforce/core/lib/sfdxError.js:151:27)
    at SourcePushCommand.catch (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/ToolbeltCommand.js:246:46)
    at async SourcePushCommand._run (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/node_modules/@salesforce/command/lib/sfdxCommand.js:95:13)
    at async Config.runCommand (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/config/lib/config.js:172:9)
    at async Main.run (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/main.js:22:9)
    at async Main._run (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Object.run (/usr/local/lib/node_modules/sfdx-cli/dist/cli.js:32:20)
******

I have updated to the latest version of sfdx to no useful effect...

Any ideas?

2
  • Can you share your apiVersion for the project and sfdx-project.json? Also please mention your OS version and sfdx version and npm version? – Mohith Shrivastava Jun 27 '20 at 21:09
  • Hello Mohith, thanks for the reply. In the end I created a brand new fresh scratch org and started again... and that fixed it. So no idea what the underlying problem was... API version is 48.0 and sfdx cli is 7.63.0 under linux. npm version 6.14.5. sfdx-project.json was basically just the stock/plain one that you get with a fresh project :-) A strange issue. – Aren Tyr Jul 1 '20 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.