node-v17.6.0 上的 node_module_version 错误
我无法在电子上运行节点画布。说以下问题。
NODE_MODULE_VERSION 102。此版本的 Node.js 需要
NODE_MODULE_VERSION 101.请尝试重新编译或重新安装
npm版本:
$ npm -v
8.5.1节点版本:
$ 节点-v
17.6.0
依赖项:
此处的依赖项
D:\test-app-latest/node_modules/sha1
Error occurred in handler for 'start-generate': Error: The module '\\?\D:\test-app-latest\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 101. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1800)
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1199:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1800)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (D:\test-app-latest\node_modules\canvas\lib\bindings.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1116:14) {
code: 'ERR_DLOPEN_FAILED'
}
I can't run node-canvas on electron. says the following issues.
NODE_MODULE_VERSION 102. This version of Node.js requires
NODE_MODULE_VERSION 101. Please try re-compiling or re-installing
npm version:
$ npm -v
8.5.1node version:
$ node -v
17.6.0
Dependencies:
Dependencies Here
D:\test-app-latest/node_modules/sha1
Error occurred in handler for 'start-generate': Error: The module '\\?\D:\test-app-latest\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 101. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1800)
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1199:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1800)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (D:\test-app-latest\node_modules\canvas\lib\bindings.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1116:14) {
code: 'ERR_DLOPEN_FAILED'
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论