📌  相关文章
📜  npm 错误!命令失败 npm err!命令 sh -c node-gyp rebuild - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:40.953000             🧑  作者: Mango

代码示例1
This is probably to do with version incompatibility - the version of the addon you're trying to compile isn't compatible with the version of Node you're trying to compile against. This is a very common thing when a new release line of Node comes out--the ecosystem needs to catch up. Node 12.1.0 is early into Node 12, so you either need to be patient for the authors of the addon to catch up or you need to update your dependencies, or get your dependencies to update their dependencies to compatible version. Or just downgrade your Node version and be patient.
If you're interacting with addon authors on these issues, encourage them to migrate to https://github.com/nodejs/node-addon-api which is intended to be a more stable API and ABI to compile against and should reduce these kinds of problems into the future.