You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node-gyp是npm内置了的,不需要再去npm install -g node-gyp, 项目里使用的node-gyp不会使用你自己全局安装的;npm需要更新为最新,因为之前用的node-gyp v8.4.1不行,报错: fatal error C1189: #error: "It looks like you are building this native module without using the right config.gypi. This normally means that you need to update electron-rebuild (>=3.2.8) or node-gyp (>=9.0.0) if you're building modules directly." ; 只能更新为最新的npm才能成功执行;
The text was updated successfully, but these errors were encountered:
这是我修改过后的rebuild.js,因为install最后报错,但是看日志并没有具体执行过程的输出,找不到问题,因为我对nodejs并不熟悉,我网上找了办法去显示子线程的日志,然后才找到rebuild失败的原因;
顺便给其他新手说下我出现的问题和解决方法:
electron-mirror=https://npmmirror.com/mirrors/electron/
msvs_version=2022
//根据你自己的安装版本和路径来msbuild_path=F:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
fatal error C1189: #error: "It looks like you are building this native module without using the right config.gypi. This normally means that you need to update electron-rebuild (>=3.2.8) or node-gyp (>=9.0.0) if you're building modules directly."
; 只能更新为最新的npm才能成功执行;The text was updated successfully, but these errors were encountered: