node:internal/modules/cjs/loader:1161 return process.dlopen(module, path.toNamespacedPath(filename)); ^
Error: The module '\?\G:\Discord bot\Bot\ZackyBot\node_modules\canvas\build\Release\canvas.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 83. This version of Node.js requires NODE_MODULE_VERSION 88. Please try re-compiling or re-installing the module (for instance, using
npm rebuildornpm install). at Object.Module._extensions..node (node:internal/modules/cjs/loader:1161:18) at Module.load (node:internal/modules/cjs/loader:967:32) at Function.Module._load (node:internal/modules/cjs/loader:807:14) at Module.require (node:internal/modules/cjs/loader:991:19) at require (node:internal/modules/cjs/helpers:92:18) at Object. (G:\Discord bot\Bot\ZackyBot\node_modules\canvas\lib\bindings.js:3:18) at Module._compile (node:internal/modules/cjs/loader:1102:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10) at Module.load (node:internal/modules/cjs/loader:967:32) at Function.Module._load (node:internal/modules/cjs/loader:807:14) at Module.require (node:internal/modules/cjs/loader:991:19) at require (node:internal/modules/cjs/helpers:92:18) at Object. (G:\Discord bot\Bot\ZackyBot\node_modules\canvas\lib\canvas.js:9:18) at Module._compile (node:internal/modules/cjs/loader:1102:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10) at Module.load (node:internal/modules/cjs/loader:967:32) { code: 'ERR_DLOPEN_FAILED' }
Asked
Active
Viewed 2,055 times
1
vuhuy09
- 11
- 2
-
This might help you : https://stackoverflow.com/questions/46398592/node-js-error-return-process-dlopenmodule-path-makelongfilename – Harshana Serasinghe Nov 28 '20 at 06:39
-
Does this answer your question? [Node - was compiled against a different Node.js version using NODE\_MODULE\_VERSION 51](https://stackoverflow.com/questions/46384591/node-was-compiled-against-a-different-node-js-version-using-node-module-versio) – Zsolt Meszaros Mar 18 '22 at 12:10
2 Answers
1
It seems like you installed a newer version of NodeJS than earlier. But you did not compile your project ZackyBot's node modules using the current version of the NodeJS you installed.
I would suggest you go to your project directory and clean all your node modules. Then reinstall them again. Follow the steps below:
- Delete
node_modulesdirectory insideZackyBotdirectory - Execute
npm installcommand on a terminal fromZackyBotdirectory
Eranga Heshan
- 3,938
- 3
- 21
- 38
0
Since you updated your nodeJS version to a newer one, you need to update your canvas too.
run npm install canvas and you should be good to go.
Jytesh
- 700
- 3
- 13