I have this custom lightning web component
import {LightningElement, api, createElement } from 'lwc';
export default class Tm_customLWCGenerator extends LightningElement {
}
And when I try to save and deploy to org it gives me the following error:
Error 57 [Line: 1, Col: 13] LWC1518: Invalid LWC imported identifier "createElement"
This is my meta.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>46</apiVersion>
<description>Generates custom lightning web component based on componentName, componentClass and api variables</description>
<masterLabel>masterLabelForLWC</masterLabel>
</LightningComponentBundle>
Is there something that I'm doing wrong? Cause I see many references using this createElement
but it's not working for me.