as part of doing Push and Deploy Lightning Web Component trail (https://trailhead.salesforce.com/content/learn/modules/lightning-web-components-basics/push-lightning-web-component-files), I have been trying to deploy source to my dev hub enabled org with following command:
sfdx force:source:deploy -p force-app -u <my org user name>
But I am getting below errors:
PROJECT PATH ERROR
───────────────────────────────────────────────────────────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
force-app/main/default/navigationMenus/Default_Navigation.navigationMenu-meta.xml Not available for deploy for this organization
force-app/main/default/networks/E-Bikes.network-meta.xml Not available for deploy for this organization
force-app/main/default/objects/Case/fields/Product__c.field-meta.xml Cannot update a field to a Lookup, MasterDetail, or Hierarchy from something else (44:13)
force-app/main/default/objects/Product_Family__c/listViews/All_Product_Families.listView-meta.xml SharedTo not allowed:roleAndSubordinatesInternal - CEO (106:19)
force-app/main/default/objects/Account/listViews/All_Acounts.listView-meta.xml SharedTo not allowed:roleAndSubordinatesInternal - CEO (103:19)
force-app/main/default/flexipages/Order_Record_Page.flexipage-meta.xml You can't change a Lightning page's associated object.
force-app/main/default/flexipages/Product_Record_Page.flexipage-meta.xml You can't change a Lightning page's associated object.
force-app/main/default/sites/E_Bikes.site-meta.xml Communities must be enabled before deploying a Chatter Network Site
force-app/main/default/siteDotComSites/E_Bikes_C.site You don't have the correct site publisher privileges for this operation Site : E-Bikes, type: Site.com Community(db=C,api=ChatterNetworkPicasso)
force-app/main/default/layouts/Case-Case Layout.layout-meta.xml In field: QuickAction - no QuickAction named Case.CaseComment found
force-app/main/default/pages/CommunitiesLanding.page Apex class 'CommunitiesLandingController' does not exist
force-app/main/default/objects/Order__c/Order__c.object-meta.xml 0M02v000000vrBO does not exist or is not a valid override for action View.
force-app/main/default/objects/Product__c/Product__c.object-meta.xml 0M02v000000vrBV does not exist or is not a valid override for action View.
force-app/main/default/networkBranding/cbE_Bikes.networkBranding Network not found for the CustomBrand : cbE_Bikes
I am not able to figure out regarding how to solve this. Please help.
EDIT
I have done the steps as mentioned in other posts as well:
1. Enable communities.
2. Delete the Product field from the Case object.
3. Update E_Bikes.site-meta.xml
4. Update E-Bikes Profile.profile
Now while executing the below command:
sfdx force:source:deploy -p force-app/main/default -u ebikesDE
Now I am getting below error:
PROJECT PATH ERROR
──────────────────────────────────────────────────────────────────────── ──────────────────────────────────────────────────────────────────────────
force-app/main/default/flexipages/Order_Record_Page.flexipage-meta.xml You can't change a Lightning page's associated object.
force-app/main/default/flexipages/Product_Record_Page.flexipage-meta.xml You can't change a Lightning page's associated object.
force-app/main/default/objects/Order__c/Order__c.object-meta.xml 0M02v000000vrBO does not exist or is not a valid override for action View.
force-app/main/default/objects/Product__c/Product__c.object-meta.xml 0M02v000000vrBV does not exist or is not a valid override for action View.
ERROR running force:source:deploy: Deploy failed.
Best Answer
I ran into the same issue, and was able to successfully push my code by following the instructions in the "Installing E-Bikes using a Developer Edition Org" section of the README in the e-bikes repo. From your revised question, it sounds like you followed the same steps, but perhaps you missed something. It's also possible that you used an existing Developer Org, perhaps with some other existing config; I used a new Trailhead Playground org. Here are all the steps I went through, starting with the steps before the deploy issue:
git clone https://github.com/trailheadapps/ebikes-lwc
ebikes-lwc
directory:sfdx force:config:set defaultdevhubusername=lwc-playground
. You could also authenticate to it directly as dev hub if you haven't added it to sfdx yet:sfdx force:auth:web:login --setdefaultdevhubusername --setalias lwc-playground
.Up to this point, everything worked as expected. When I tried to take the next step of pushing to my LWC Playground/Dev Hub org (
sfdx force:source:deploy -p force-app -u lwc-playground
), I encountered the same list of errors that you did. To resolve, I again referred to e-bikes repo's README and followed the steps for a Developer Org, as follows:cunning-moose-123
). Make note of this value for later.Product
custom field.force-app/main/default/sites/E_Bikes.site-meta.xml
, changing<siteAdmin>
to be my Playground org User Name (you can see this usingsfdx force:org:list
, and changing<subdomain>
to be the subdomain I used in step 2.mdapiDeploy/unpackaged/profiles/E-Bikes Profile.profile
, changing the<userLicense>
at the end of the file toGuest
.sfdx force:source:deploy -p force-app/main/default -u lwc-playground
).