7

I have a simple package that I pulled down from my production org that I am now looking to push:source to a scratch org. The issue is that when I run

sfdx force:mdapi:convert -r test/unpackaged

I get a converted source structure within my force-app/main/default/objects/ but without the necessary object-meta.xml that source needs to perform the push, for example:

Account.object-meta.xml

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"/>

Leaving me with the following error:

ERROR:  Expected metadata file at source path: ../force-app/main/default/objects/Account/Account.object-meta.xml.

I've run an update on my CLI as that was initially a concern but even after the update I still get the same results. I've deleted my source and tried multiple times to see if it was just a glitch, but this continues to happen without fail. Any suggestions or thoughts? Anyone else experiencing the same issue?

1
  • 1
    One thing I'm seeing now when I refresh the entire scratch org and attempt this it no longer expects the Account.object-meta.xml So it's possible this is just another case of lose artifacts being tracked in a scratch org's sourcePathInfos.js, hence a new org on first push wouldn't require that component. Mar 17, 2018 at 0:49

1 Answer 1

0

Please verify that you have Account.object xml file in your Source pulled from Production.

When you pull Standard object, you have to specify them explicitly:

sfdx force:source:retrieve -m CustomObject:Account

or by Ant

<types>
<members>
Account
</members>
<name>
CustomObject
</name>
</types>

So if you use just

<types>
<members>
*
</members>
<name>
CustomObject
</name>
</types>

your Account.object XML file won't be retrieved from your production org, thus, won't be converted into Account.object-meta.xml

You must log in to answer this question.

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