Skip to content

ReferenceError: document is not defined at createTag (node >18) #149

@zifeo

Description

@zifeo

Overview

Using NextJS, we got:

Error occurred prerendering page "/X". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: document is not defined at createTag ...

This has been reported as a potential bug related to the node version: Gamote/lottie-react#101.

Consuming repo

What repo were you working in when this issue occurred?

# use node 20 or 21
npx create-next-app@latest
# edit app/page.ts
# add the Player component as demo

Labels

  • Add the Type: Bug label to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions