6

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

2 Answers 2

1

This error can be caused if you have a -meta-xml.cls file without the corresponding source file.

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
  • 1
    I ended up using sfdx force:source:deploy instead. That still works. Commented Apr 14, 2019 at 23:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .