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

chore(repo): upgrade to latest Node 22 LTS #15749

Merged
merged 2 commits into from
Dec 6, 2024
Merged

chore(repo): upgrade to latest Node 22 LTS #15749

merged 2 commits into from
Dec 6, 2024

Conversation

Nodonisko
Copy link
Contributor

Description

Related Issue

Resolve

Screenshots:

@Nodonisko Nodonisko requested a review from a team as a code owner December 3, 2024 15:54
Copy link

github-actions bot commented Dec 3, 2024

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 17
  • More info

Learn more about 𝝠 Expo Github Action

@Nodonisko
Copy link
Contributor Author

Can someone from Connect team fix that one failing build? @trezor/suite-connect

@mroz22
Copy link
Contributor

mroz22 commented Dec 3, 2024

yes. soon (days, not hours)

@mroz22
Copy link
Contributor

mroz22 commented Dec 4, 2024

I am not sure how this problem is related with update to the next node version and we are not seeing it in current builds. It looks like next.js is not able to prepare static builds because there are imports from react-lottie (via @trezor/components) that depend on document object.

ReferenceError: document is not defined
    at createTag (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:30:5)
    at <unknown> (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:1316:20)
    at <unknown> (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:1323:6)
    at <unknown> (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:1540:4)
    at <unknown> (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:2:83)
    at Object.<anonymous> (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:5:3)
   Collecting page data  .ReferenceError: document is not defined
    at createTag (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:30:5)
    at <unknown> (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:1316:20)
    at <unknown> (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:1323:6)
    at <unknown> (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:1540:4)
    at <unknown> (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:2:83)
    at Object.<anonymous> (/Users//repos/trezor-suite/node_modules/lottie-web/build/player/lottie.js:5:3)

> Build error occurred

Not sure, do we need to import everything from @trezor/components dynamically?

import dynamic from 'next/dynamic';

const {Button }  = dynamic(() => import('@trezor/components'), { ssr: false });

? cc @martykan

@martykan
Copy link
Member

martykan commented Dec 4, 2024

I don't think dynamic imports would be a nice solution for this.

Seems like they are working on some fix in Lottie, but it's not released yet Gamote/lottie-react#101
I would try the workaround with NODE_OPTIONS="--no-experimental-global-navigator"

@Nodonisko Nodonisko enabled auto-merge (squash) December 5, 2024 16:28
@Nodonisko Nodonisko merged commit 370c46e into develop Dec 6, 2024
68 of 69 checks passed
@Nodonisko Nodonisko deleted the chore/node-22 branch December 6, 2024 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants