error rebuild electron 18.0.0 on Windows
See original GitHub issueOn Mac, electron-rebuild -v 18.0.0
is OK.
On Windows, electron-rebuild -v 17.0.0
will success, but electron-rebuild -v 18.0.0
will get errors:
Building module: tutor-mupdf-addon, Completed: 0
c:\users\feixiang\.electron-gyp\18.0.0\include\node\v8-traced-handle.h(240): error C2061: 语法错误: 标识符“TracedGlobal<`templ
ate-type-parameter-1'>” [D:\code\tutor-mupdf-addon\build\tutor-mupdf-addon.vcxproj]
c:\users\feixiang\.electron-gyp\18.0.0\include\node\v8-traced-handle.h(335): note: 参见对正在编译的 类 模板 实例化 "v8::TracedGloba
l<T>" 的引用
c:\users\feixiang\.electron-gyp\18.0.0\include\node\v8-traced-handle.h(240): error C2334: “:”的前面有意外标记;跳过明 显的函数体 [D:\code
\tutor-mupdf-addon\build\tutor-mupdf-addon.vcxproj]
c:\users\feixiang\.electron-gyp\18.0.0\include\node\v8-traced-handle.h(22): fatal error C1075: “{”: 未找到匹配令牌 [D:\code\tu
tor-mupdf-addon\build\tutor-mupdf-addon.vcxproj]
× Rebuild Failed
An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'D:\code\tutor-mupdf-addon'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".
Error: `C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe` failed with exit code: 1
Error: node-gyp failed to rebuild 'D:\code\tutor-mupdf-addon'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".
Error: `C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe` failed with exit code: 1
at NodeGyp.rebuildModule (D:\Code\tutor-mupdf-addon\node_modules\electron-rebuild\lib\src\module-type\node-gyp.js:117:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ModuleRebuilder.rebuildNodeGypModule (D:\Code\tutor-mupdf-addon\node_modules\electron-rebuild\lib\src\module-rebuilder.js:94:9)
at async ModuleRebuilder.rebuild (D:\Code\tutor-mupdf-addon\node_modules\electron-rebuild\lib\src\module-rebuilder.js:124:14)
at async Rebuilder.rebuildModuleAt (D:\Code\tutor-mupdf-addon\node_modules\electron-rebuild\lib\src\rebuild.js:145:13)
at async Rebuilder.rebuild (D:\Code\tutor-mupdf-addon\node_modules\electron-rebuild\lib\src\rebuild.js:108:17)
at async D:\Code\tutor-mupdf-addon\node_modules\electron-rebuild\lib\src\cli.js:154:9
error Command failed with exit code 4294967295.
Why and how to resolve it ?
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:8
Top Results From Across the Web
Issues · electron/rebuild - GitHub
Package to rebuild native Node.js modules against the currently installed Electron version - Issues ... error rebuild electron 18.0.0 on Windows.
Read more >An unhandled error occurred inside electron-rebuild
Option 1 Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows ...
Read more >Electron 20.0.0
Electron 20.0.0 has been released! It includes upgrades to Chromium 104 , V8 10.4 , and Node.js 16.15.0 . Read below for more...
Read more >electronjs - Bountysource
On Mac, electron-rebuild -v 18.0.0 is OK. On Windows, electron-rebuild -v 17.0.0 will success, but electron-rebuild -v 18.0.0 will get errors:
Read more >electron-builder-squirrel-windows | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Might have been fixed by https://github.com/electron/electron/pull/34109
I will try tomorrow and see if I can still reproduce it in my project.
I try to
electron-rebuild -v 18.0.0 -f -w better-sqlite3
with VS2017, But it throw some c++ compile error.But it is work in VS2019, so I guess it maybe relate with VS version