sfdx force:source:convert --sourcepath force-app  -d  deployment
ERROR running force:source:convert:  The "path" argument must be of type string. Received type object

What am I doing wrong here?

Here is my CLI version information.

sfdx -v
sfdx-cli/7.49.1-2b6ba86a25 darwin-x64 node-v10.15.3

OS: MacOS 10.14.6

Terminal: zsh 5.3 (x86_64-apple-darwin18.0)

  • 1
    What shell are you using? That might have an effect. – sfdcfox Mar 11 '20 at 3:37
  • @sfdcfox updated. – javanoob Mar 11 '20 at 3:41

Here is what I did to locate the problem after going through the discussion in this issue: https://github.com/forcedotcom/cli/issues/94

  1. Created a new folder named force-app1 and updated force-app in sfdx-project.json to force-app1
  2. Copied entire main folder from force-app to force-app1
  3. Tried the command sfdx force:source:convert -p force-app1 -d test and it failed.
  4. Removed force1-app/main/default/classes folder and retried step 3, same result.
  5. Repeated step 4 until I found which folder is causing the problem.

In my case, I had a file named foo__c.field-meta.xml in installedPackages folder. I have to trace my steps as why this happened but this is the root cause.

This error could be more specific than too generic and I hope this helps others.

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.