Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lottie-web] document is not defined. #186

Open
priscilaandreani opened this issue Oct 18, 2024 · 0 comments
Open

[lottie-web] document is not defined. #186

priscilaandreani opened this issue Oct 18, 2024 · 0 comments

Comments

@priscilaandreani
Copy link

Problema:
A biblioteca lottie-web utilizada no componente de LoadingIndicator não é compatível com versões node>20 em projetos NextJS.

Temos várias issues relacionadas no repo da lib, todos abertos:
airbnb/lottie-web#3047
airbnb/lottie-web#2950
airbnb/lottie-web#3047
airbnb/lottie-web#2739
(…)

O erro ocorre durante o processo de build da aplicação:

ReferenceError: document is not defined
    at createTag (/**/node_modules/lottie-web/build/player/lottie.js:30:5)
    at /**/node_modules/lottie-web/build/player/lottie.js:1316:20
    at /**/node_modules/lottie-web/build/player/lottie.js:1323:6
    at /**/node_modules/lottie-web/build/player/lottie.js:1540:4
    at /**/node_modules/lottie-web/build/player/lottie.js:2:83
    at Object.<anonymous> (/**/node_modules/lottie-web/build/player/lottie.js:5:3)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
    at Module._load (node:internal/modules/cjs/loader:1127:12)

> Build error occurred

Possível solução
Utilizar uma biblioteca alternativa, uma vez que a lottie-web não é atualizada desde junho de 2023.

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

No branches or pull requests

1 participant