For now, you need to have the pre-release version installed for DX:
sfdx plugins:install salesforcedx@pre-release
Make sure you've also updated all extensions, including Lightning Web Components, which is not currently part of the Salesforce Extension Pack.
Often, simply restarting after installing/updating all extensions and the pre-release sfdx plugin will automatically create the lwc folder for you. You may also need to close and re-open the folder for it to take effect. I'm not sure how/why my lwc folder appeared, but it wasn't obvious as to what I did.
If all else fails, create a new project in a new, empty directory, and copy the lwc folder back into force-app/main/default/
, so that it has two files:
./force-app/main/default/lwc/.eslintrc.json
./force-app/main/default/lwc/jsconfig.json
Once you've done that, you'll stop getting that error and be able to create new components. These config files may require modification if you copy from a new project, so make sure you check the file paths of jsconfig.json. Every time you create a new component with sfdx, jsconfig.json will be updated with more metadata, so make sure you commit this file if you're using a repo.
NOTE: Even though you'll be able to create files locally, to push to the server, you need a pre-release org for now, since all new LWC features are tied to API 45.0 and later, while all production and scratch orgs will be 44.0.
You currently have the isExposed
attribute set to false
, it needs to be set to true
for the component to be available on the targeted pages and app builder.
<isExposed>true</isExposed>
By definition:
isExposed
A Boolean value. Exposes the component in all orgs, and in Lightning App Builder and Community Builder
Best Answer
Salesforce Developer here. The LWC playground has been fixed. Give it a try!