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 rebuild
ornpm 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,929 times
1

vuhuy09
- 11
- 1
- 2
-
This might help you : https://stackoverflow.com/questions/46398592/node-js-error-return-process-dlopenmodule-path-makelongfilename – Harshana 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
3 Answers
2
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_modules
directory insideZackyBot
directory - Execute
npm install
command on a terminal fromZackyBot
directory

Eranga Heshan
- 5,133
- 4
- 25
- 48
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
- 815
- 4
- 15
0
This might be due to improper installation of node modules and can occur due to poor network conditions. Solved this issue by deleting the nodemodules folder and doing a clean installation of node modules files by running "npm install".

Joel Jose
- 11
- 1
-
Please don't add "thank you" as an answer. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation), you will be able to [vote up questions and answers](https://stackoverflow.com/help/privileges/vote-up) that you found helpful. - [From Review](/review/late-answers/33195863) – Zsolt Meszaros Nov 21 '22 at 09:29