3

I'm trying to load a sample LWC using the Light DOM (Beta) https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_light_dom

I've stripped it down to essentially their example and I still get the following error on running it on the local server:

Invalid directive "$lwc:render-mode" on element <template>.

My component:

<template lwc:render-mode="light">

    <p>Hello World</p>

</template>

JS:

import { LightningElement } from 'lwc';
    export default class TestForm extends LightningElement {
    static renderMode = 'light';

}

API version of the component is set to 57.0

2

1 Answer 1

0

I'm having the same problem. I think the problem is the API version of the local dev server. I just installed the local dev plugin for the first time on my computer and when it started up I got

Starting LWC Local Development.
Username: [email protected]
Api Version: 49.0

I'm not sure Salesforce has updated the local dev server since Summer '20. Perhaps they'll update it when Light DOM is GA?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .