我正在开发一个节点应用程序。我必须使用robotsjs的地方。当我尝试将包安装到我的节点应用程序时,我遇到了一些错误。
Activating extension 'x' failed: The module '\\?
\d:\x\app\node_modules\robotjs\build\Release\robotjs.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 75. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`)
我想这可能是因为我的 Node 版本。S0 我将节点版本从 v12.18.3 更改为 v14.9.0。
但是在改变之后,我得到了。
Activating extension 'x' failed: The module
'\\?\d:\x\app\node_modules\robotjs\build\Release\robotjs.node'
was compiled against a different Node.js version using NODE_MODULE_VERSION 83.
This version of Node.js requires NODE_MODULE_VERSION 75.
Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm
install`)
在搜索了我的问题后,robotjs
我发现了这个robotjs-stackoverflow。
但这也不适合我。我试图重建以 NODE_MODULE_VERSION 75 为目标的robotjs 包。仍然是同样的问题。
经过一番挖掘,我发现没有包含NODE_MODULE_VERSION 75的节点版本。检查 NODE_MODULE_VERSION 列。那为什么我会收到错误消息。有什么帮助吗?