-
Notifications
You must be signed in to change notification settings - Fork 44
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
Conversation
There was a problem hiding this 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
There was a problem hiding this 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.
There was a problem hiding this 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
.
Link to Issue
Closes: #9968
Description of Changes
"How We Fixed It"
Test Plan
FIXME()
call.Deployment Plan
Other Considerations