Skip to content
This repository was archived by the owner on Jun 20, 2026. It is now read-only.
This repository was archived by the owner on Jun 20, 2026. It is now read-only.

lottie files stored in public are failing to work, error Cannot read properties of undefined (reading 'length') #174

Description

@bloodykheeng

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",

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions