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

Update node to v18 #616

Closed
1 of 2 tasks
carlgieringer opened this issue Nov 7, 2023 · 1 comment · Fixed by #617
Closed
1 of 2 tasks

Update node to v18 #616

carlgieringer opened this issue Nov 7, 2023 · 1 comment · Fixed by #617
Assignees

Comments

@carlgieringer
Copy link
Contributor

carlgieringer commented Nov 7, 2023

v16 is already EoL.

  • Updating Next.js for Nextra requires v18.
  • check react native build.
  • Update the lambda runtimes

Upgrade node:

brew upgrade nodenv
nodenv install --list
nodenv install 18.18.2
nodenv local 18.18.2

Re-install Yarn:

corepack enable
yarn init -2
yarn set version stable

Re-install deps into node:

yarn

Output ( 3230 packages were added to the project (+ 423.97 MiB).?):

※ yarn
➤ YN0048: Automatically removed core plugins that are now builtins 👍

➤ YN0087: Migrated your project to the latest Yarn version 🚀

➤ YN0000: · Yarn 4.0.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + typescript@patch:typescript@npm%3A4.9.4#optional!builtin<compat/typescript>::version=4.9.4&hash=289587, fsevents@patch:fsevents@npm%3A2.3.2#optional!builtin<compat/fsevents>::version=2.3.2&hash=df0bf1, and 5 more.
➤ YN0085: │ - @react-md/form@https://github.com/Howdju/react-md.git#workspace=%40react-md%2Fform&commit=739fcf8b359727d958d6befe46014fe8b3dfe11c, fsevents@patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>::version=2.3.2&hash=df0bf1, and 6 more.
➤ YN0000: └ Completed in 20s 714ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0060: │ eslint is listed by your project with version 8.27.0, which doesn't satisfy what @react-native-community/eslint-config (p2f252) and other dependencies request (^7.0.0).
➤ YN0060: │ node-sass is listed by your project with version 8.0.0, which doesn't satisfy what sass-loader (pd9923) requests (^4.0.0 || ^5.0.0).
➤ YN0060: │ typescript is listed by your project with version 4.9.4, which doesn't satisfy what msw (p2cdf8) requests (>=4.2.0 <4.9.0-0).
➤ YN0002: │ howdju-ajv-sourced@workspace:howdju-ajv-sourced doesn't provide @types/node (p671a5), requested by ts-node.
➤ YN0002: │ howdju-browser-extension@workspace:premiser-ext doesn't provide @types/node (pcff5c), requested by ts-node.
➤ YN0002: │ howdju-client-common@workspace:howdju-client-common doesn't provide @types/node (p06ebf), requested by ts-node.
➤ YN0002: │ howdju-common@workspace:howdju-common doesn't provide @types/node (p3e625), requested by ts-node.
➤ YN0002: │ howdju-message-handler@workspace:lambdas/howdju-message-handler doesn't provide @types/node (p09b6f), requested by ts-node.
➤ YN0002: │ howdju-message-handler@workspace:lambdas/howdju-message-handler doesn't provide typescript (pb72f4), requested by ts-node.
➤ YN0002: │ howdju-mobile-app@workspace:howdju-mobile-app doesn't provide @react-native-community/cli (pdb359), requested by @callstack/repack.
➤ YN0002: │ howdju-mobile-app@workspace:howdju-mobile-app doesn't provide @react-native-community/cli-types (p3c9df), requested by @callstack/repack.
➤ YN0002: │ howdju-mobile-app@workspace:howdju-mobile-app doesn't provide @types/node (p4e0df), requested by ts-node.
➤ YN0002: │ howdju-monorepo@workspace:. doesn't provide react (p62a36), requested by @react-md/alert.
➤ YN0002: │ howdju-service-common@workspace:howdju-service-common doesn't provide @types/node (p1cf9f), requested by ts-node.
➤ YN0002: │ howdju-service-common@workspace:howdju-service-common doesn't provide react (p21452), requested by @hot-loader/react-dom.
➤ YN0002: │ howdju-test-common@workspace:howdju-test-common doesn't provide @types/node (p0e533), requested by ts-node.
➤ YN0002: │ howdju-test-common@workspace:howdju-test-common doesn't provide typescript (pe577d), requested by ts-node.
➤ YN0002: │ premiser-api@workspace:premiser-api doesn't provide @types/node (p6372c), requested by ts-node.
➤ YN0002: │ premiser-processing@workspace:premiser-processing doesn't provide @types/node (pfa8b0), requested by ts-node.
➤ YN0002: │ premiser-processing@workspace:premiser-processing doesn't provide typescript (p407b9), requested by ts-node.
➤ YN0002: │ premiser-ui@workspace:premiser-ui doesn't provide @testing-library/dom (p5f38a), requested by @testing-library/user-event.
➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 3230 packages were added to the project (+ 423.97 MiB).
➤ YN0000: └ Completed in 39s 648ms
➤ YN0000: ┌ Link step
➤ YN0008: │ git-hooks@npm:1.1.10 must be rebuilt because its dependency tree changed
➤ YN0008: │ esbuild@npm:0.18.17 must be rebuilt because its dependency tree changed
➤ YN0008: │ aws-sdk@npm:2.918.0 must be rebuilt because its dependency tree changed
➤ YN0008: │ esbuild@npm:0.18.18 must be rebuilt because its dependency tree changed
➤ YN0008: │ aws-sdk@npm:2.912.0 must be rebuilt because its dependency tree changed
➤ YN0008: │ esbuild@npm:0.15.18 must be rebuilt because its dependency tree changed
➤ YN0008: │ esbuild@npm:0.19.2 must be rebuilt because its dependency tree changed
➤ YN0008: │ aws-sdk@npm:2.902.0 must be rebuilt because its dependency tree changed
➤ YN0008: │ core-js@npm:3.12.1 must be rebuilt because its dependency tree changed
➤ YN0008: │ esbuild@npm:0.15.10 must be rebuilt because its dependency tree changed
➤ YN0008: │ node-sass@npm:8.0.0 must be rebuilt because its dependency tree changed
➤ YN0008: │ msw@npm:0.48.0 [82a5f] must be rebuilt because its dependency tree changed
➤ YN0008: │ core-js@npm:2.6.12 must be rebuilt because its dependency tree changed
➤ YN0008: │ core-js-pure@npm:3.32.0 must be rebuilt because its dependency tree changed
➤ YN0000: └ Completed in 19s 431ms
➤ YN0000: · Done with warnings in 1m 21s
@carlgieringer carlgieringer self-assigned this Nov 7, 2023
@carlgieringer
Copy link
Contributor Author

carlgieringer commented Nov 7, 2023

Then the UI build was broken:

※ yarn run start:ui:local
  howdju-ui:webpack Loading env webpack from ./webpack.development.config.ts +0ms
Using default API host: localhost
Using default API root: https://api.howdju.com/api/
assets by status 509 KiB [compared for emit]
  assets by path fonts/ 486 KiB
    assets by path fonts/*.woff2 102 KiB 8 assets
    assets by path fonts/*.otf 383 KiB 5 assets
  assets by path *.png 14.1 KiB
    asset android-chrome-256x256.png 4.23 KiB [compared for emit] [from: public/android-chrome-256x256.png] [copied]
    asset android-chrome-192x192.png 3.21 KiB [compared for emit] [from: public/android-chrome-192x192.png] [copied]
    + 4 assets
  + 5 assets
assets by status 2.48 KiB [emitted]
  asset premiser-ui.js 1.55 KiB [emitted] (name: main) 1 related asset
  asset index.html 960 bytes [emitted]
./src/main.tsx 39 bytes [built] [code generated] [1 error]

ERROR in ./src/main.tsx
Module build failed (from ../node_modules/babel-loader/lib/index.js):
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at filename (/Users/transverna/code/github/Howdju/howdju/node_modules/babel-loader/lib/cache.js:94:23)
    at /Users/transverna/code/github/Howdju/howdju/node_modules/babel-loader/lib/cache.js:120:39
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/transverna/code/github/Howdju/howdju/node_modules/babel-loader/lib/cache.js:3:103)
    at _next (/Users/transverna/code/github/Howdju/howdju/node_modules/babel-loader/lib/cache.js:5:194)
    at /Users/transverna/code/github/Howdju/howdju/node_modules/babel-loader/lib/cache.js:5:364
    at new Promise (<anonymous>)
    at /Users/transverna/code/github/Howdju/howdju/node_modules/babel-loader/lib/cache.js:5:97

webpack 5.76.1 compiled with 1 error in 5367 ms

Which probably makes sense because babel-loader@8 supports >= 8.9 whereas v9 supports >= 14.15.0 (https://webpack.js.org/loaders/babel-loader/)

So I tried to upgrade everything babel-related (need to do this for extension and mobile app.)

yarn add babel-loader babel-plugin-module-resolver babel-plugin-react-require babel-jest @babel/cli @babel/core @babel/plugin-transform-parameters @babel/plugin-transform-runtime @babel/preset-env @babel/preset-react @babel/preset-typescript

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 a pull request may close this issue.

1 participant