![](/img/trans.png)
[英]I am not able to uninstall nodejs. After I got the error module not found “node-uuid”
[英]“I got an error after reinstalling nodejs”
node:internal/modules/cjs/loader:1161 return process.dlopen(module, path.toNamespacedPath(filename)); ^
錯誤:模塊 '\?\G:\Discord bot\Bot\ZackyBot\node_modules\canvas\build\Release\canvas.node' 是針對不同的 Node.js 版本使用 NODE_MODULE_VERSION 83 編譯的。此版本的 Z3B2819DD4C24EDA2FAF2052EEF449551 需要 NODE_MODULE49551嘗試重新編譯或重新安裝模塊(例如,使用
npm rebuild
或npm install
)。 在 Object.Module._extensions..node (node:internal/modules/cjs/loader:1161:18) 在 Module.load (node:internal/modules/cjs/loader:967:32) 在 Function._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)在 Object。 (G:\Discord bot\Bot\ZackyBot\node_modules\canvas\lib\bindings.js:3:18) 在 Module._compile (node:internal/modules/cjs/loader:1102:14) 在 Object.Module._extensions ..js (node:internal/modules/cjs/loader:1131:10) 在 Module.load (node:internal/modules/cjs/loader:967:32) 在 Function.Module._load (node:internal/modules/ cjs/loader:807:14) 在 Module.require (node:internal/modules/cjs/loader:991:19) 在 require (node:internal/modules/cjs/helpers:92:18) 在 Object。 (G:\Discord bot\Bot\ZackyBot\node_modules\canvas\lib\canvas.js:9:18) 在 Module._compile (node:internal/modules/cjs/loader:1102:14) 在 Object.Module._extensions ..js (node:internal/modules/cjs/loader:1131:10) 在 Module.load (node:internal/modules/cjs/loader:967:32) { code: 'ERR_DLOPEN_FAILED' }
看起來您安裝了比以前更新的 NodeJS 版本。 但是您沒有使用您安裝的當前版本的 NodeJS 編譯您的項目ZackyBot
的節點模塊。
我建議您將 go 到您的項目目錄並清理所有節點模塊。 然后重新安裝它們。 請按照以下步驟操作:
node_modules
目錄中的ZackyBot
目錄ZackyBot
目錄在終端上執行npm install
命令由於您將 nodeJS 版本更新為較新的版本,因此您也需要更新 canvas。
運行npm install canvas
你應該對 go 很好。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.