0

I have retrieved lightning components from an existing old org. Now I am trying to move these components into scratch org using SFDX. I have done the following

  1. Created a project using vscode.
  2. Authorized a devhub org.
  3. Created a scratch org.
  4. I have used the commands

    sfdx force:mdapi:convert -r ../srcdir -d ./targetdir
    sfdx force:mdapi:deploy -d ./targetdir

The deployment is successful. But i do not see the components in the scratch org.

I have also tried the sfdx force:source:push. I see the message source pushed but I still do not see the components in the org.

SFDX force:mdapi:deploy enter image description here lightning components in directory

  • 1
    Have you made sure to change the defaultusername to your Scratch Org? Because you mentioned that you retrieved it from one of your Orgs, you may be executing the deploy commands on the same Org possibly? – Jayant Das Feb 17 at 22:34
  • Yes, I did. I have been opening the scratch orgs and verifying that the deployments requests being successful. – Venkata Feb 18 at 0:13
  • And the components or the metadata bundle are listed in package.xml? – Jayant Das Feb 18 at 0:40
  • Yes. Not individually named out, but with an asterisk for each type. – Venkata Feb 18 at 18:02
  • As a workaround for now, I used intellij to deploy the components to a non scratch org. Used the commands sfdx force:mdapi:retrieve -r ./retrieve1 -k ./retrieve/package.xml . sfdx force:mdapi:deploy -d ./retrieve1 Manyally copied the folders, aura,classes,objects and static resources into force-app/main/default ,created a scratch org and then ran the command sfdx force:source:push. – Venkata Feb 18 at 18:10
0

I am far from an SFDX expert. But have you tried sfdx force:source:push ? I think deploy is only for non-scratch orgs.

  • I have used both deploy and source:push. Both posts a appropriate success messages. In case of deploy, I see the success log in the deployment status page. But I do not see components. – Venkata Feb 17 at 20:59

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.