5

I'm using the exact same methodology and commands I've used dozens of times, and now I'm getting an error.

VS Code, latest version; sfdx extensions, latest versions.

I want to convert my source to mdapi, then deploy to my patch org. I create the directory: mkdir mdapioutput

Then I put in the convert command: sfdx force:source:convert -d mdapioutput/

Instead of converting, it gives this error:

patmcclellan: /Users/patmcclellan/Documents/GitHub/protontext-repo git:(master) 
-> sfdx force:source:convert -d mdapioutput/ 
ERROR running force:source:convert:  The "path" argument must be of type string. Received type undefined

Can't figure out what I'm doing wrong. Any ideas?

Here's the sfdx-project.json:

 {  
      "packageDirectories": [
        {
          "path": "force-app",
          "default": true
        }
      ],
      "namespace": "",
      "sfdcLoginUrl": "https://login.salesforce.com",
      "sourceApiVersion": "42.0"
}

I tried specifying the path as well:

    patmcclellan: /Users/patmcclellan/Documents/GitHub/protontext-repo git:(master) 
-> sfdx force:source:convert -r force-app -d mdapioutput/

ERROR running force:source:convert:  The "path" argument must be of type string. Received type undefined
0

Looks like a bug. The -r parameter should be specified for the source directory. Alternatively, make sure the sfdx-project.json file contains a default path.

  • 1
    I ended up using sfdx force:source:deploy instead. That still works. – PatMcClellan__c Apr 14 '19 at 23:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.