I have stored my lottie files in public folder and when i try to use there url in src i get an error
lottie.js:491 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at completeLayers (lottie.js:491:32)
const Lottie = dynamic(() => import("lottie-react"), { ssr: false });
const NoDataLottie = "/lottie-files/nodata.json";
const SnailErrorLottie = "/lottie-files/snail-error-lottie.json";
function FaqsListing() {
...........rest of the code
<div className="max-w-md">
<Lottie animationData={SnailErrorLottie} loop autoplay />
</div>
here are my versions
"lottie-react": "^2.4.1",
"next": "16.0.7",
"react": "19.2.1",
"react-dom": "19.2.1",