process.dlopen(module, path.toNamespacedPath(filename));
grdAyush opened this issue · 2 comments
grdAyush commented
Whenever i Require Musicard i get this Error My Code Is Working Fine Without Importing Musicard Although It Is Installed Whenever I Require I Get This Error:
node:internal/modules/cjs/loader:1340
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: The module '/home/ayushd/Documents/Codes/Bot/node_modules/canvas/build/Release/canvas.node'
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:1340:18)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/home/ayushd/Documents/Codes/Bot/node_modules/canvas/lib/bindings.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12) {
code: 'ERR_DLOPEN_FAILED'
}
Node.js v18.18.0
flameface commented
Do npm rebuild
, if that doesn't works, remove package-lock.json file and node_modules folder and then run npm i
command.
grdAyush commented
Ok Thank You Fixed I just Removed package-lock.json