I've worked on developing ligthing component using sfdx and till some point everything worked fine. Today I got latest changes from my git repo and tried to make sfdx force:source:push
but it failed with a message Unexpected file found in package directory: path_to_my_source\force-app\main\default\classes\MyCustomApex.cls
. I spent some time investigating this but at some point of time I decided to start from the scratch but still got the same exception. Here is what I did:
- Cloned my repository to the new folder
- Authorzied in DevHub trial using
sfdx force:auth:web:login -a DevHub -d -s
- Created new scratch org using
sfdx force:org:create -a MyNewOrg -s -f config/project-scratch-def.json
- Installed Lightning Test Service using
sfdx force:lightning:test:install
Now I try to push my cloned sources into the scratch org using sfdx force:source:push
but keep getting this error. I tried to checkout the version that for sure had only my code and worked for me but the error remained. Am I doing something wrong? Did I miss anything?