4

I am doing trailheads

https://trailhead.salesforce.com/en/content/learn/projects/quick-start-lightning-web-components/create-a-hello-world-lightning-web-component?trail_id=build-lightning-web-components

and it gets to a point when I must push some lwc files to an org.

If I create a scratch org it works fine and I can push the files. But I can't connect trailhead to a scratch org (not supported).

So I created a Partner Developer org through environment hub and connected cci with:

cci org connect thead-dev001 --login-url https://marktheaddev001-dev-ed.my.salesforce.com

But when I try:

cci task run dx_push --org thead-dev001

I get

2021-09-05 12:01:30: Org info updated, writing to keychain
2021-09-05 12:01:30: Beginning task: SFDXOrgTask
2021-09-05 12:01:30: As user: [email protected]
2021-09-05 12:01:30: In org: 00D5f000001z7mDEAQ
2021-09-05 12:01:30: 
2021-09-05 12:01:30: Running command: sfdx force:source:push
2021-09-05 12:01:38: Return code: 1
stderr: ERROR running force:source:push:  
This command can only be used on orgs that have source tracking enabled, 
such as sandboxes and scratch orgs.
Return code: 1
stderr: ERROR running force:source:push:  
This command can only be used on orgs that have source tracking enabled, 
such as sandboxes and scratch orgs. 

Run this command for more information about debugging errors: cci error --help

So I am confused because the documentation says:

https://cumulusci.readthedocs.io/en/stable/connected_orgs.html

In addition to creating scratch orgs in CumulusCI, you can connect persistent orgs to your project to run tasks and flows on them. This feature supports use cases such as deploying to a Developer Edition org to release a package version, or installing to a sandbox for user acceptance testing.

What am I doing wrong? How can I use cci to deploy lwc files to a developer org? Or what can I do to make cci and trailhead play nice together?

I have already selected the option 'Enable Source Tracking in Sandboxes' on the Dev Hub/Environment Hub. But this does not seem to make a difference.

1 Answer 1

6

Use the deploy task to deploy to a persistent org that does not have source tracking (as Developer Editions do not):

 cci task run deploy --org thead-dev001

You can use this against Trailhead playgrounds, Developer Editions, sandboxes of all kinds, and production orgs.

2
  • Say @david-reed , any idea what to do if you try that and then get it complaining src not found and deployment package is empty; skipping deployment ?
    – k..
    Sep 22, 2021 at 21:02
  • Nevermind, I got it! Had to add a ` --path force-app\main\default` to the end of your suggested command, based on where the actual "classes," "triggers," etc. folders lived relative to the folder I was running the commands from.
    – k..
    Sep 22, 2021 at 21:05

You must log in to answer this question.

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