Can't run winax with electron 13.1.4
chpuget opened this issue · comments
Hi,
I am using the latest winax version 3.1.5
I have upgraded to electron@latest which is currently 13.1.4 (https://www.electronjs.org/)
At runtime, I get error : ActiveXObject failed : The module '\?\C:......\node_modules\winax\build\Release\node_activex.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 83. This version of Node.js requires NODE_MODULE_VERSION 89. Please try re-compiling or re-installing the module (for instance, using npm rebuild
or npm install
).
Which is normal as I didn't rebuild for electron
Then I launch : npm rebuild winax --runtime=electron --target=13.1.0 --dist-url=https://electronjs.org/headers --build-from-source
But then I get error :
ActiveXObject failed : The module '\?\C:......\node_modules\winax\build\Release\node_activex.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 79. This version of Node.js requires NODE_MODULE_VERSION 89. Please try re-compiling or re-installing the module (for instance, using npm rebuild
or npm install
).
Do you see how to make it work ?
Thanks and regards
Chris
Thanks for your fast answer durs,
I have tried yesterday with many targets : 14x, 15.x, 16.x, ..., but none has a module version 89
Today, I tried this :
npm install winax --msvs_version=2017
"scripts": {
"execute": "electron .",
"rebuild": "electron-rebuild -f -w winax",
...
},
npm run rebuild
I get error :
⠙ Building module: winax, Completed: 1 win_delay_load_hook.cc
⠧ Building module: winax, Completed: 1 Creating library C:...\node_modules\winax\build\Release\node_act
ivex.lib and object C:...\node_modules\winax\build\Release\node_act
ivex.exp
disp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr __thiscall v8::ArrayBuffer::GetBackingStore(void)" (_imp?GetBackingStore@ArrayBuffer@v8@@QAE?AV?$shared_pt
r@VBackingStore@v8@@@std@@xz) [C:...\node_modules\winax\build\node_ac
tivex.vcxproj]
C:...\node_modules\winax\build\Release\node_activex.node : fatal erro
r LNK1120: 1 unresolved externals [C:...\node_modules\winax\build\nod
e_activex.vcxproj]
✖ Rebuild Failed
An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'C:...\node_modules\winax'.
Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe
failed with exit code: 1
Error: node-gyp failed to rebuild 'C:...\node_modules\winax'.
Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe
failed with exit code: 1
at ModuleRebuilder.rebuildNodeGypModule (C:\...\node_modules\electron-rebuild\lib\src\module-rebuilder.js:193:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Rebuilder.rebuildModuleAt (C:\...\node_modules\electron-rebuild\lib\src\rebuild.js:190:9)
at async Rebuilder.rebuild (C:\...\node_modules\electron-rebuild\lib\src\rebuild.js:152:17)
at async C:\...\node_modules\electron-rebuild\lib\src\cli.js:146:9
Maybe it's because it's using VS2019 to rebuild (I have both 2017 and 2019 on my machine)
Can you retry this with 3.1.6
?
For me this problem sometimes appeared and then disappeared again
3.1.5
introduced a way to build this repo as a library that broke on Electron but 3.1.6
should fix that
VS2019 works fine for me
Hi Daniel,
Can you please explain what you did exactly ?
I have the latest electron 13.1.7
{
node: '14.16.0',
v8: '9.1.269.36-electron.0',
uv: '1.40.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.16.1',
modules: '89',
nghttp2: '1.41.0',
napi: '7',
llhttp: '2.1.3',
openssl: '1.1.1',
icu: '68.1',
unicode: '13.0',
electron: '13.1.7',
chrome: '91.0.4472.124'
}
On my side, I still have issues with the latest winax 3.1.6
-
using "rebuild": "electron-rebuild --msvs_version=2017 -f -w winax" or "rebuild": "electron-rebuild -f -w winax" (=VS2019) : compilation error as seen above
"disp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr<class v8::Bac......" -
using "rebuild2": "npm rebuild winax --runtime=electron --target=14.16.0 --dist-url=https://electronjs.org/headers --build-from-source --msvs_version=2017" or "rebuild2": "npm rebuild winax --runtime=electron --target=14.16.0 --dist-url=https://electronjs.org/headers --build-from-source" (=VS2019) : the build works but module version is 83 and not 89
Regards
Hi durs,
Any idea how to solve this issue ?
The version 3.1.4 2 months ago made it work with electron 12 : ec3d098
Any way to adapt it to electron 13 ?
Thanks for your help
Chris
Interesting...
I'm currently testing it with Electron 11 only;
but I was able to reproduce your problem with electron 13.1.7.
Apparently these are related:
nodejs/nan#892
electron/electron#29893
I am also getting the same error with the latest electron. Please let us know if there is any workaround or fix is coming.
thanks for the fix, and sorry for delay, I close the issue