我在docker镜像中;运行ubuntu 16时我使用以下命令更新了节点
sudo npm install -g n
sudo n lts现在,我获得了以下控制台输出
node -v
v12.18.2我需要重新构建一个node-gyp绑定。
node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@3.0.3
gyp info using node@4.2.6 | linux | x64以及当我尝试用以下命令运行它时产生错误的输出
Error: The module '/root/gzweb/gzbridge/build/Debug/gzbridge.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 46. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).这是有道理的。
我的问题是node-gyp从哪里获取它的节点?如何更新node-gyp?如何更新node-gyp要使用的node版本?
谢谢
发布于 2020-07-08 15:24:25
在节点更新之后,我需要重新运行npm install -g node-gyp;然后它选择了更新版本的node-gyp
https://stackoverflow.com/questions/62781326
复制相似问题