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

Upgrades node 22 and pnpm #9967

Merged
merged 6 commits into from
Nov 22, 2024
Merged

Conversation

Rotorsoft
Copy link
Contributor

@Rotorsoft Rotorsoft commented Nov 20, 2024

Link to Issue

Closes: #9968

Description of Changes

  • Upgrades to node 22
  • Upgrades pnpm to 9.14.2
  • Fixes typing issues
  • Refactors Outbox typings

"How We Fixed It"

Test Plan

  • Unit tested the FIXME() call.
  • CA (click around) tested on local and frack:
    • TODO page

Deployment Plan

Other Considerations

@github-actions github-actions bot marked this pull request as draft November 20, 2024 15:44
@Rotorsoft Rotorsoft marked this pull request as ready for review November 20, 2024 15:55
Copy link
Collaborator

@timolegros timolegros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the version in .nvmrc

timolegros
timolegros previously approved these changes Nov 21, 2024
Copy link
Collaborator

@timolegros timolegros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting this error when I run pnpm start. I have updated to Node22 using nvm and my pnpm version is also updated to 9.14.2.

[21:09:52.187] ERROR (port.ts): Unhandled Rejection 
    err: {
      "type": "Error",
      "message": "The module '/home/timolegros/Projects/commonwealth/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Release/better_sqlite3.node'\nwas compiled against a different Node.js version using\nNODE_MODULE_VERSION 115. This version of Node.js requires\nNODE_MODULE_VERSION 127. Please try re-compiling or re-installing\nthe module (for instance, using `npm rebuild` or `npm install`).",
      "stack":
          Error: The module '/home/timolegros/Projects/commonwealth/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
          was compiled against a different Node.js version using
          NODE_MODULE_VERSION 115. This version of Node.js requires
          NODE_MODULE_VERSION 127. Please try re-compiling or re-installing
          the module (for instance, using `npm rebuild` or `npm install`).
              at Object..node (node:internal/modules/cjs/loader:1715:18)
              at Module.load (node:internal/modules/cjs/loader:1318:32)
              at Function._load (node:internal/modules/cjs/loader:1128:12)
              at TracingChannel.traceSync (node:diagnostics_channel:315:14)
              at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
              at Module.require (node:internal/modules/cjs/loader:1340:12)
              at require (node:internal/modules/helpers:141:16)
              at bindings (/home/timolegros/Projects/commonwealth/node_modules/.pnpm/[email protected]/node_modules/bindings/bindings.js:112:48)
              at new Database (/home/timolegros/Projects/commonwealth/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/lib/database.js:48:64)
              at new ModelDB (file:///home/timolegros/Projects/commonwealth/node_modules/.pnpm/@[email protected]/node_modules/@canvas-js/modeldb-sqlite/lib/ModelDB.js:28:19)
      "code": "ERR_DLOPEN_FAILED"
    }

Fixed it with pnpm rebuild. As part of this PR you should provide instructions in all-eng about upgrading Node + Pnpm and then possibly running the rebuild.

@timolegros timolegros dismissed their stale review November 21, 2024 19:13

Docker version

Copy link
Collaborator

@timolegros timolegros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Node version in the Docker builds needs to be updated as well. See Dockerfile.datadog.

@timolegros timolegros merged commit 33da3dc into master Nov 22, 2024
10 checks passed
@timolegros timolegros deleted the rotorsoft/upgrade-to-node22-pnpm-too branch November 22, 2024 18:53
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.

Upgrade to node 22
3 participants