I create a Lightning Web Component with a lightning-card and a lightning-record-edit-form and added it to a Lightning Community page. In debug mode I get a console log error message for pretty much every field.

The message is:

Error: [LWC error]: The insertBefore method is available only on elements that use the lwc:dom="manual" directive

The component is completely functional, however I don't like seeing those messages and not know what they mean.

Screenshot snippet of the message: enter image description here

  • check this:- salesforce.stackexchange.com/questions/252266/… Oct 16, 2019 at 5:37
  • @sanketkumar, I'm not using the directive lwc:dom="manual"
    – Vincent
    Oct 16, 2019 at 6:27
  • You need to add the attribute lwc:dom="manual" to the part of the code that you are going to manually manipulate. You should consider an aura:if or something else to avoid this Oct 16, 2019 at 18:17
  • @CasparHarmer, this is not an aura component. This is a lightning component. Also, I'm not manually manipulating the DOM.
    – Vincent
    Oct 18, 2019 at 4:41
  • I meant to write if:true|false={expression} - a html directive. Anyway since you are using a built in component, then the salesforce team that made the component needs to add lwc::dom="manual" to their component. Oct 18, 2019 at 6:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.