我正在处理一个节点应用程序。我必须和罗博兹一起工作。当我试图将软件包安装到我的节点应用程序时,我遇到了一些错误。
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 I将节点版本从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-堆栈溢出。
但这也不适合我。我试图重建针对NODE_MODULE_VERSION 75的robotjs包。还是同样的问题。
经过一番研究,我发现没有包含第75版的节点版本。检查NODE_MODULE_VERSION列。那我为什么要犯这个错误。有什么帮助吗?
发布于 2020-09-02 19:28:03
尝试以下方法
1)您必须重新构建包,并告诉npm更新它也是二进制的。尝试:
npm rebuild robotjs --update-binary
有关更多第51版,请参考以下内容
以下是列表node_module版本https://nodejs.org/en/download/releases/
如果您在npm cache clean --force
上,请尝试执行以下步骤
https://stackoverflow.com/questions/63712163
复制相似问题