Skip to content

canvas was compiled against a different node version #2474

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

Open
xyloblonk opened this issue Dec 27, 2024 · 2 comments
Open

canvas was compiled against a different node version #2474

xyloblonk opened this issue Dec 27, 2024 · 2 comments

Comments

@xyloblonk
Copy link

xyloblonk commented Dec 27, 2024

I deleted my node_modules, .npm, package-lock.json, did npm install, npm audit, npm rebuild, tried npm 12, 14, 16, 17, 18, 19, 20, 21 and this error won't go away.

Error: The module was compiled against a different Node.js version using
NODE_MODULE_VERSION 102. This version of Node.js requires
NODE_MODULE_VERSION 108. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Module._extensions..node (node:internal/modules/cjs/loader:1460:18)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/home/container/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12) {
  code: 'ERR_DLOPEN_FAILED'
@chearon
Copy link
Collaborator

chearon commented Dec 29, 2024

The latest version (3.0.0) uses the stable node API. Can you upgrade?

@nguyennhukhanh
Copy link

nguyennhukhanh commented Feb 5, 2025

I also have Issue like you
node_modules/canvas/build/Release/canvas.node'\nwas compiled against a different Node.js version using\nNODE_MODULE_VERSION 108. This version of Node.js requires\nNODE_MODULE_VERSION 109. Please try re-compiling or re-installing\nthe module (for instance, using npm rebuildornpm install)


node version: v18.20.6

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

No branches or pull requests

3 participants