You need to sign in to do that
Don't have an account?
Jonathon Hiley 4
Can't push components to organization using salesforce cli
I was working through the 'Lightning Web Components Basics' trailhead unit and was successfully able to push the E-bikes demo app and components to my organization. As per the trailhead instructions, I was using the salesforce CLI command:
This worked initially, but after making the prescribed changes to some web components for the unit, the deploy command now fails with the error:
Is there something wrong with my CLI configuration? Or organization configuration?
sfdx force:source:deploy -p force-app -u <username>
This worked initially, but after making the prescribed changes to some web components for the unit, the deploy command now fails with the error:
The component must implement at least one of lightning__AppPage interface.Even if I checkout the e-bike demo app code clean from GitHub, it still fails with the same error.
Is there something wrong with my CLI configuration? Or organization configuration?
sfdx force:source:deploy --forceoverwrite -p force-app -u <username>
I have version sfdx-cli/7.3.0-94ecf2d5ee win32-x64 node-v10.15.3
As a resolution i removed the(selector) component from the lightning app page. Saved the lightning app page.
Again deployed the same component through command and it got deployed successfully. Added the component back on the lightning app page & ran the app page.
Make sure you check your errors in all the files of the LWC.
For me, it was just having a duplicate variable declared during a refactor...
Error on push/deploy was "Error force-app/main/default/lwc/myLwc/myLwc.js bad result: { TypeError: Cannot read property 'buildError' of undefined at Scope.checkBlockScopedCollisions (/home/sfdc/tools/lwc/1.1.13-224.8/node_modules/@lwc-platform/sfdc-lwc-compiler/node_modules/@babel/traverse/lib/scope/index.js:347:22) at Scope.registerBinding (/home/sfdc/tools/lwc/1.1.13-224.8/node_modules/@lwc-platform/sfdc-lwc-compiler/node_modules/@babel/traverse/lib/scope/index.js:504:16) at Scope.registerDeclaration (/home/sfdc/tools/lwc/1.1.13-224.8/node_modules/@lwc-platform/sfdc-lwc-compiler/node_modules/@babel/traverse/lib/scope/index.js:444:14) at Object.BlockScoped (/home/sfdc/tools/lwc/1.1.13-224.8/node_modules/@lwc-platform/sfdc-lwc-compiler/node_modules/@babel/traverse/lib/scope/index.js:189:28) at Obje"
Super helpful error message. :-)