+ Start a Discussion
Tyler Zika 19Tyler Zika 19 

push source to scratch org failing - sfdx

the conversion was successful on my meta data from my  org, but when I do this command
 
sfdx force:source:push -u my-scratch-org
I get this error: Cannot read property 'getSourcePath' of undefined.

What could be the problem?

 
Amit GoyalAmit Goyal
Hi Tyler,

This a known issue:
https://success.salesforce.com/issues_view?id=a1p3A000000mCmuQAE

Although i didn't made any changes in the source but I am still affected by this.
Let me know if you were able to find any workaround on this.

Thanks.
Lee Gregory 4Lee Gregory 4
I just had this happen, and googling that error still does not show any fixes.  My project was only a few weeks old and nothing had changed.  The only way I could get around this was to create a brand new project, copy and pasting all code from the old one.  The new project was able to push source successfully.  Comparing the projects, the .sfdx/org/<scratch org user>/sourcePathInfos.json file is way different, with the new project having a much larger file.  So my theory is that missing entries in that file is what triggers the error, but I'm not sure why or how those entries get remove or not created in the first place.