Anyone got Lottiefiles working in FM?

I have installed the library, from

@lottiefiles/lottie-player

I downloaded an animation as JSON from lottiefiles

My script is very simple

import "@lottiefiles/lottie-player";

window.runLoaderAnimation = () => {

  let container = document.querySelector("#container");
  const player =
    '<h1>Loading...</h1><lottie-player src="./assets/loader.json" background="transparent" speed="1" style="width: 300px; height: 300px" direction="1" playMode="normal" loop autoplay></lottie-player>';
  container.innerHTML = player;

};

The lottie player loads but the animation does not run.

In console I get an error: