Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use node-activex for electron@21.4.1 #121

Open
lianyzhou opened this issue Mar 7, 2023 · 3 comments
Open

Can't use node-activex for electron@21.4.1 #121

lianyzhou opened this issue Mar 7, 2023 · 3 comments

Comments

@lianyzhou
Copy link

First thanks to great job on creating node-activex.
when is use it in electron@21.4.1, it reports an error
image
then i found solution by node-activex's main page,so i did:

npm rebuild winax --runtime=electron --target=16.16.0 --dist-url=https://electronjs.org/headers --build-from-source

from command line i can see rebuild successfully, but when i start electron app, it does't help

then i try electron-builder install-app-deps or electron-rebuild,both encoutered an error:

> electron-builder install-app-deps

  • electron-builder  version=22.14.13
  • loaded parent configuration  file=E:\editor-app\report-editor\node_modules\electron-webpack\out\electron-builder.js
  • rebuilding native dependencies  dependencies=sqlite3@5.1.1, winax@3.3.4 platform=win32 arch=x64
  ⨯ cannot execute  cause=exit status 1
                    errorOut=npm ERR! code 1
    npm ERR! path E:\editor-app\report-editor\node_modules\winax
    npm ERR! command failed
    npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
    npm ERR! 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
    npm ERR!   main.cpp
    npm ERR! c:\users\lianyi\.electron-gyp\21.4.1\include\node\v8-callbacks.h(331): error C2062: 意外的类型“int” [E:\editor-app\report-editor\node_modules\winax\build\node_activex.vcxproj]
    npm ERR! c:\users\lianyi\.electron-gyp\21.4.1\include\node\v8-isolate.h(1531): error C2061: 语法错误: 标识符“WasmDynamicTieringEnabledCallback” [E:\editor-app\report-editor\node_modules\winax\build\node_activex.vcxproj]
    npm ERR! c:\users\lianyi\.electron-gyp\21.4.1\include\node\v8-wasm.h(192): warning C4996: 'v8::WasmStreaming::Client': Use SetMoreFunctionsCanBeSerializedCallback [E:\editor-app\report-editor\node_modules\winax\build\node_activex.vcxproj]
    npm ERR!   c:\users\lianyi\.electron-gyp\21.4.1\include\node\v8-wasm.h(137): note: 参见“v8::WasmStreaming::Client”的声明
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp info using node-gyp@9.3.1
    npm ERR! gyp info using node@16.16.0 | win32 | x64
    npm ERR! gyp info find Python using Python version 3.9.9 found at "C:\Python39\python.exe"
    npm ERR! gyp info find VS using VS2017 (15.9.33027.88) found at:
    npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
    npm ERR! gyp info find VS run with --verbose for detailed information
    npm ERR! gyp info spawn C:\Python39\python.exe
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args   'E:\\editor-app\\report-editor\\node_modules\\node-gyp\\gyp\\gyp_main.py',
    npm ERR! gyp info spawn args   'binding.gyp',
    npm ERR! gyp info spawn args   '-f',
    npm ERR! gyp info spawn args   'msvs',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   'E:\\editor-app\\report-editor\\node_modules\\winax\\build\\config.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   'E:\\editor-app\\report-editor\\node_modules\\node-gyp\\addon.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   'C:\\Users\\lianyi\\.electron-gyp\\21.4.1\\include\\node\\common.gypi',
    npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
    npm ERR! gyp info spawn args   '-Dvisibility=default',
    npm ERR! gyp info spawn args   '-Dnode_root_dir=C:\\Users\\lianyi\\.electron-gyp\\21.4.1',
    npm ERR! gyp info spawn args   '-Dnode_gyp_dir=E:\\editor-app\\report-editor\\node_modules\\node-gyp',
    npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\lianyi\\\\.electron-gyp\\\\21.4.1\\\\<(target_arch)\\\\node.lib',
    npm ERR! gyp info spawn args   '-Dmodule_root_dir=E:\\editor-app\\report-editor\\node_modules\\winax',
    npm ERR! gyp info spawn args   '-Dnode_engine=v8',
    npm ERR! gyp info spawn args   '--depth=.',
    npm ERR! gyp info spawn args   '--no-parallel',
    npm ERR! gyp info spawn args   '--generator-output',
    npm ERR! gyp info spawn args   'E:\\editor-app\\report-editor\\node_modules\\winax\\build',
    npm ERR! gyp info spawn args   '-Goutput_dir=.'
    npm ERR! gyp info spawn args ]
    npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args   'build/binding.sln',
    npm ERR! gyp info spawn args   '/clp:Verbosity=minimal',
    npm ERR! gyp info spawn args   '/nologo',
    npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=x64'
    npm ERR! gyp info spawn args ]
    npm ERR! gyp ERR! build error
    npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
    npm ERR! gyp ERR! stack     at ChildProcess.onExit (E:\editor-app\report-editor\node_modules\node-gyp\lib\build.js:203:23)
    npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
    npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    npm ERR! gyp ERR! System Windows_NT 10.0.19044
    npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\editor-app\\report-editor\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
    npm ERR! gyp ERR! cwd E:\editor-app\report-editor\node_modules\winax
    npm ERR! gyp ERR! node -v v16.16.0
    npm ERR! gyp ERR! node-gyp -v v9.3.1
    npm ERR! gyp ERR! not ok

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\lianyi\AppData\Local\npm-cache\_logs\2023-03-07T15_52_31_753Z-debug.log

                    command='C:\Program Files\nodejs\node.exe' 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js' rebuild sqlite3@5.1.1 winax@3.3.4
                    workingDir=

my computer environment:

win32 10.0.19044(x64) Windows 10 Home China 21H2
Windows Feature Experience Pack 120.2212.4190.0

nodejs version: v16.16.0
winax version: 3.3.4
electron version: 21.4.1

@lianyzhou
Copy link
Author

i test the newest electron version i can use is 19.1.9, when comes for electron 20.0.0, it encounter an error as above

@durs
Copy link
Owner

durs commented Mar 10, 2023

I still do not understand this issue, so I do not know how to help.
See Native Node Modules

@bluef1ash
Copy link

I also get this error, my electron version is 28.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants