You need to sign in to do that
Don't have an account?
Evgeniy
How to delete Lightning Web Component?
I'm trying to delete new Lightning Web Component without any luck.
I've tried to find it in Dev Console, but as you know it doesn't support Lightning Web Components yet. Another way I've tried to delete my lwc in VS Code and just deploy source to sandbox, but it still there in my sandbox org and I can see it in Lightning App Builder and when I try to retrieve source I see this error
But as mentioned here this should be fixed tomorrow https://github.com/forcedotcom/cli/issues/33
So for now I have it in org but don't have in VS Code.
Thanks!
I've tried to find it in Dev Console, but as you know it doesn't support Lightning Web Components yet. Another way I've tried to delete my lwc in VS Code and just deploy source to sandbox, but it still there in my sandbox org and I can see it in Lightning App Builder and when I try to retrieve source I see this error
ERROR: Cannot read property 'fileName' of undefined.
But as mentioned here this should be fixed tomorrow https://github.com/forcedotcom/cli/issues/33
So for now I have it in org but don't have in VS Code.
Thanks!
Greetings to you!
Please make sure you are using the latest version of salesforcedx. To work with Lightning web components, you need version 45 or greater of the Salesforce CLI. Check the installed version.
sfdx plugins --core
NOTE: If you had a prerelease version of the CLI installed, run this command to update it.
sfdx plugins:install salesforcedx@latest
Please refer to the below link which might help you further with the above requirement.
https://www.developer.atsiro.com/2019/01/23/lwc-part-3/
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
Please make sure you are using the latest version of salesforcedx. To work with Lightning web components, you need version 45 or greater of the Salesforce CLI. Check the installed version.
sfdx plugins --core
NOTE: If you had a prerelease version of the CLI installed, run this command to update it.
sfdx plugins:install salesforcedx@latest
Please refer to the below link which might help you further with the above requirement.
https://www.developer.atsiro.com/2019/01/23/lwc-part-3/
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Step 1 : Go to You VS code workspace and find the component and Delete the LWC folder
Step 2: Push the changes using SFDX
And Now component will be deleted
SELECT Id, apiversion, developerName, FullName, targetConfigs FROM LightningComponentBundle where developerName = 'myComponent'
Select the row from the query results, then click the "Delete Row" button on the query grid.