0
Error: The module '\\?\D:\SOLANA\metaplex-master\js\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 93. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1183:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (D:\SOLANA\metaplex-master\js\node_modules\canvas\lib\bindings.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_DLOPEN_FAILED'

我尝试过其他类似帖子的建议,但似乎没有任何效果。许多此类问题也针对 mac 或 linux,但对于如何在 Windows 上解决此问题几乎没有帮助。

我已经多次使用 npm 和 nvm 重新安装了 node.js。节点版本是 16.13.0,这应该是 NODE_MODULE_VERSION 93 的正确版本,但仍然在运行代码时

npx ts-node js/packages/cli/src/candy-machine-v2-cli.ts 上传 ./assets --env devnet --keypair ~/.config/

发生同样的错误。

谢谢

4

0 回答 0