When creating lightning components with sfdx I was giving the full path,


when I was already in the directory that I wanted to place the component in. Therefore I created a bunch of unecessary sub directories. Before I knew it I had pushed to the org with all these wrong directories:


I deleted the subdirectories and put all the components in the same dir where they belong but now when trying to push or pull I get:

ERROR: Expected content file(s) at source path(s): /home/maxbisesi/Public/geolocation/force-app/main/default/aura/force-app/main/default/aura/AccountLocator/AccountLocator.cmp.

What do I do ?


I tried

sfdx force:source:push --forceoverwrite

No dice...

1 Answer 1


In the root of your project, there should be a folder called


In there you will find a folder called


And in there will be a folder for each org you are pushing to. Inside each of those folders you will find a file called


This file is where SFDX keeps track of what files it knows about, when they were last edited, what type of thing they are, etc etc etc

To fix your problem, you can do one of two things:

  1. Find and replace all instances of


    in that file with


    if you're on Windows you may need to swap the / with \\ but you'll be able to see what you need when you open the file. Once that's done you can do

    sfdx force:source:push -u <your alias>

    and it should succeed.

  2. Alternatively you can just delete the entire file, and do

    sfdx force:source:push -u <your alias>

    Note: This will cause your whole project to be pushed rather than just changes, but afaict that just makes it slower - it doesn't break anything (or hasn't for me)

I've done it both ways and still haven't decided which is faster/easier. It would be nice if there was an sfdx cli command to re-scan the directory rather than having to do this by hand, but I've not found it yet...

You must log in to answer this question.

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