I'm using the Salesforce LIGHTNING WEB COMPONENTS PLAYGROUND to build a prototype in LWC:
https://developer.salesforce.com/docs/component-library/tools/playground/
However when I add an additional LWC not already in use on the HTML page, such as:
<lightning-input-field field-name="FirstName"></lightning-input-field>
I get the following compilation error message:
"Could not load /api/runtime/lwc-components/1.0.25-alpha/src/aura// (imported by /api/runtime/lwc-components/1.0.25-alpha/src/lightning/lookupDesktop/): LWC1016: Expected an object with files to be compiled."
Am I missing any step here?
Best Answer
The core issue here is that the:
expects to have data via a
Since the playground is not backed by a Salesforce Org there is inherently no Record data.
The documentation says:
While docs don't explicitly call out that you can't use this on it's own this is the case.
You can use a
There are some pre-made examples in the playground.