1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Angular ng build gives error link.parentNode.insertBefore is not a function

Discussão em 'Angular' iniciado por Francesco Cappellini, Maio 20, 2025.

  1. I have an Angular v16 app that currently works fine when I serve it on my local machine. Anyway when I try to build it, it gives me the following response:

    ✔ Browser application bundle generation complete.
    ✔ Copying assets complete.
    ✖ Index html generation failed.
    link.parentNode.insertBefore is not a function


    I don't use the insertBefore function in any of my components or services. I thought it could depend from the fact I have installed jquery and datatables in my project (since I know there are some incompatibility issues between angular and jquery and I saw insertBefore is used frequently in jquery.js) but even after uninstalling all the dependencies and commenting the references, it keeps failing the ng build with the same error. What can it be? I truly have no clue...

    Continue reading...

Compartilhe esta Página