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 build with electron #43

Open
ch3rn1k opened this issue Oct 7, 2022 · 7 comments
Open

Can't build with electron #43

ch3rn1k opened this issue Oct 7, 2022 · 7 comments
Labels
info-needed Issue requires more information from poster

Comments

@ch3rn1k
Copy link

ch3rn1k commented Oct 7, 2022

Hello, I can't build package when using native-keymap with electron, can some one help? Ty

0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\ch3rn1k\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Users\ch3rn1k\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 1ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:G:\Work\...\release\app\.npmrc Completed in 0ms
10 timing config:load:project Completed in 4ms
11 timing config:load:file:C:\Users\ch3rn1k\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\ch3rn1k\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 11ms
19 timing npm:load:configload Completed in 11ms
20 timing npm:load:mkdirpcache Completed in 1ms
21 timing npm:load:mkdirplogs Completed in 0ms
22 verbose title npm rebuild [email protected] [email protected] [email protected] [email protected]
23 verbose argv "rebuild" "[email protected]" "[email protected]" "[email protected]" "[email protected]"
24 timing npm:load:setTitle Completed in 1ms
25 timing config:load:flatten Completed in 2ms
26 timing npm:load:display Completed in 3ms
27 verbose logfile logs-max:10 dir:C:\Users\ch3rn1k\AppData\Local\npm-cache\_logs
28 verbose logfile C:\Users\ch3rn1k\AppData\Local\npm-cache\_logs\2022-10-07T17_40_37_656Z-debug-0.log
29 timing npm:load:logFile Completed in 5ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 21ms
33 timing arborist:ctor Completed in 0ms
34 silly logfile start cleaning logs, removing 1 files
35 silly logfile done cleaning log files
36 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules/electron-active-window
37 timing build:queue Completed in 1ms
38 info run [email protected] preinstall node_modules/electron-active-window node setup.js
39 info run [email protected] preinstall { code: 0, signal: null }
40 timing build:run:preinstall:node_modules/electron-active-window Completed in 59ms
41 timing build:run:preinstall Completed in 60ms
42 info run [email protected] install node_modules/electron-active-window prebuild-install || node-gyp rebuild
43 info run [email protected] install node_modules/keysender node-gyp rebuild
44 info run [email protected] install node_modules/native-keymap node-gyp rebuild
45 info run [email protected] install node_modules/uiohook-napi node-gyp-build
46 info run [email protected] install { code: 0, signal: null }
47 timing build:run:install:node_modules/uiohook-napi Completed in 113ms
48 info run [email protected] install { code: 1, signal: null }
49 timing command:rebuild Completed in 3322ms
50 verbose stack Error: command failed
50 verbose stack     at ChildProcess.<anonymous> (C:\Users\ch3rn1k\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:63:27)
50 verbose stack     at ChildProcess.emit (node:events:526:28)
50 verbose stack     at maybeClose (node:internal/child_process:1092:16)
50 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
51 verbose pkgid [email protected]
52 verbose cwd G:\Work\...\release\app
53 verbose Windows_NT 10.0.22000
54 verbose node v16.14.2
55 verbose npm  v8.16.0
56 error code 1
57 error path G:\Work\...\release\app\node_modules\native-keymap
58 error command failed
59 error command C:\WINDOWS\system32\cmd.exe /d /s /c C:\Users\ch3rn1k\AppData\Local\Temp\install-8356474c.cmd
60 error �믮������ ��᫥����⥫쭠� ᡮઠ �஥�⮢ � �⮬ �襭��. �⮡� ������� ��ࠫ������ ᡮ��, ������� ��ࠬ��� "/m".
60 error   string_conversion.cc
60 error   keymapping.cc
60 error c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-callbacks.h(221): error C2062: ⨯ "int" �� �ॡ���� [G:\Work\...\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
60 error c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-callbacks.h(335): error C2062: ⨯ "int" �� �ॡ���� [G:\Work\...\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
60 error c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-isolate.h(292): error C3646: legacy_oom_error_callback: ��������� ᯥ�䨪��� ��८�।������ [G:\Work\...\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
60 error c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-isolate.h(292): error C4430: ��������� ᯥ�䨪��� ⨯� - �।���������� int. �ਬ�砭��. C++ �� �����ন���� int �� 㬮�砭�� [G:\Work\...\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
60 error c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-isolate.h(1482): error C2061: ᨭ⠪��᪠� �訡��: �����䨪��� "LegacyOOMErrorCallback" [G:\Work\...\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
60 error c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-isolate.h(1545): error C2061: ᨭ⠪��᪠� �訡��: �����䨪��� "WasmDynamicTieringEnabledCallback" [G:\Work\...\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
60 error c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-initialization.h(290): error C2061: ᨭ⠪��᪠� �訡��: �����䨪��� "LegacyOOMErrorCallback" [G:\Work\...\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
61 error gyp info it worked if it ends with ok
61 error gyp info using [email protected]
61 error gyp info using [email protected] | win32 | x64
61 error gyp info find Python using Python version 3.10.7 found at "C:\Users\ch3rn1k\AppData\Local\Programs\Python\Python310\python.exe"
61 error gyp info find VS using VS2017 (15.9.28307.2094) found at:
61 error gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
61 error gyp info find VS run with --verbose for detailed information
61 error gyp info spawn C:\Users\ch3rn1k\AppData\Local\Programs\Python\Python310\python.exe
61 error gyp info spawn args [
61 error gyp info spawn args   'G:\\Work\\...\\node_modules\\node-gyp\\gyp\\gyp_main.py',
61 error gyp info spawn args   'binding.gyp',
61 error gyp info spawn args   '-f',
61 error gyp info spawn args   'msvs',
61 error gyp info spawn args   '-I',
61 error gyp info spawn args   'G:\\Work\\...\\release\\app\\node_modules\\native-keymap\\build\\config.gypi',
61 error gyp info spawn args   '-I',
61 error gyp info spawn args   'G:\\Work\\...\\node_modules\\node-gyp\\addon.gypi',
61 error gyp info spawn args   '-I',
61 error gyp info spawn args   'C:\\Users\\ch3rn1k\\.electron-gyp\\20.1.3\\include\\node\\common.gypi',
61 error gyp info spawn args   '-Dlibrary=shared_library',
61 error gyp info spawn args   '-Dvisibility=default',
61 error gyp info spawn args   '-Dnode_root_dir=C:\\Users\\ch3rn1k\\.electron-gyp\\20.1.3',
61 error gyp info spawn args   '-Dnode_gyp_dir=G:\\Work\\...\\node_modules\\node-gyp',
61 error gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\ch3rn1k\\\\.electron-gyp\\\\20.1.3\\\\<(target_arch)\\\\node.lib',
61 error gyp info spawn args   '-Dmodule_root_dir=G:\\Work\\...\\release\\app\\node_modules\\native-keymap',
61 error gyp info spawn args   '-Dnode_engine=v8',
61 error gyp info spawn args   '--depth=.',
61 error gyp info spawn args   '--no-parallel',
61 error gyp info spawn args   '--generator-output',
61 error gyp info spawn args   'G:\\Work\\...\\release\\app\\node_modules\\native-keymap\\build',
61 error gyp info spawn args   '-Goutput_dir=.'
61 error gyp info spawn args ]
61 error gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
61 error gyp info spawn args [
61 error gyp info spawn args   'build/binding.sln',
61 error gyp info spawn args   '/clp:Verbosity=minimal',
61 error gyp info spawn args   '/nologo',
61 error gyp info spawn args   '/p:Configuration=Release;Platform=x64'
61 error gyp info spawn args ]
61 error gyp ERR! build error 
61 error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
61 error gyp ERR! stack     at ChildProcess.onExit (G:\Work\...\node_modules\node-gyp\lib\build.js:203:23)
61 error gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
61 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
61 error gyp ERR! System Windows_NT 10.0.22000
61 error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "G:\\Work\\...\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
61 error gyp ERR! cwd G:\Work\...\release\app\node_modules\native-keymap
61 error gyp ERR! node -v v16.14.2
61 error gyp ERR! node-gyp -v v9.2.0
61 error gyp ERR! not ok
62 verbose exit 1
63 timing npm Completed in 3431ms
64 verbose unfinished npm timer build 1665164437824
65 verbose unfinished npm timer build:deps 1665164437824
66 verbose unfinished npm timer build:run:install 1665164437885
67 verbose unfinished npm timer build:run:install:node_modules/electron-active-window 1665164437885
68 verbose unfinished npm timer build:run:install:node_modules/keysender 1665164437904
69 verbose unfinished npm timer build:run:install:node_modules/native-keymap 1665164437908
70 verbose code 1
71 error A complete log of this run can be found in:
71 error     C:\Users\ch3rn1k\AppData\Local\npm-cache\_logs\2022-10-07T17_40_37_656Z-debug-0.log

@ch3rn1k
Copy link
Author

ch3rn1k commented Oct 7, 2022

When I'm trying to rebuild I'm getting error:

0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\ch3rn1k\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Users\ch3rn1k\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 1ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 0ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:G:\Work\...\release\app\.npmrc Completed in 0ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:C:\Users\ch3rn1k\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\ch3rn1k\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 10ms
19 timing npm:load:configload Completed in 10ms
20 timing npm:load:mkdirpcache Completed in 1ms
21 timing npm:load:mkdirplogs Completed in 0ms
22 verbose title npm i
23 verbose argv "i"
24 timing npm:load:setTitle Completed in 1ms
25 timing config:load:flatten Completed in 2ms
26 timing npm:load:display Completed in 3ms
27 verbose logfile logs-max:10 dir:C:\Users\ch3rn1k\AppData\Local\npm-cache\_logs
28 verbose logfile C:\Users\ch3rn1k\AppData\Local\npm-cache\_logs\2022-10-07T18_35_21_166Z-debug-0.log
29 timing npm:load:logFile Completed in 5ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 21ms
33 timing arborist:ctor Completed in 0ms
34 silly logfile start cleaning logs, removing 2 files
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 43ms
37 timing idealTree:userRequests Completed in 0ms
38 silly idealTree buildDeps
39 timing idealTree:#root Completed in 0ms
40 timing idealTree:buildDeps Completed in 1ms
41 timing idealTree:fixDepFlags Completed in 0ms
42 timing idealTree Completed in 47ms
43 timing arborist:ctor Completed in 0ms
44 timing reify:loadTrees Completed in 65ms
45 timing reify:diffTrees Completed in 4ms
46 silly reify moves {}
47 timing reify:retireShallow Completed in 1ms
48 timing reify:createSparse Completed in 0ms
49 timing reify:loadBundles Completed in 0ms
50 silly audit bulk request {
50 silly audit   'base64-js': [ '1.5.1' ],
50 silly audit   bl: [ '4.1.0' ],
50 silly audit   buffer: [ '5.7.1' ],
50 silly audit   chownr: [ '1.1.4' ],
50 silly audit   color: [ '4.2.3' ],
50 silly audit   'color-convert': [ '2.0.1' ],
50 silly audit   'color-name': [ '1.1.4' ],
50 silly audit   'color-string': [ '1.9.1' ],
50 silly audit   'decompress-response': [ '6.0.0' ],
50 silly audit   'deep-extend': [ '0.6.0' ],
50 silly audit   'detect-libc': [ '2.0.1' ],
50 silly audit   'electron-active-window': [ '0.0.6' ],
50 silly audit   'end-of-stream': [ '1.4.4' ],
50 silly audit   'expand-template': [ '2.0.3' ],
50 silly audit   fs: [ '0.0.1-security' ],
50 silly audit   'fs-constants': [ '1.0.0' ],
50 silly audit   'github-from-package': [ '0.0.0' ],
50 silly audit   ieee754: [ '1.2.1' ],
50 silly audit   inherits: [ '2.0.4' ],
50 silly audit   ini: [ '1.3.8' ],
50 silly audit   'is-arrayish': [ '0.3.2' ],
50 silly audit   keysender: [ '2.0.3' ],
50 silly audit   'node-addon-api': [ '5.0.0', '1.7.2' ],
50 silly audit   'lru-cache': [ '6.0.0' ],
50 silly audit   'mimic-response': [ '3.1.0' ],
50 silly audit   minimist: [ '1.2.6' ],
50 silly audit   'mkdirp-classic': [ '0.5.3' ],
50 silly audit   'napi-build-utils': [ '1.0.2' ],
50 silly audit   'native-keymap': [ '3.3.1' ],
50 silly audit   'node-abi': [ '3.24.0' ],
50 silly audit   'node-gyp-build': [ '4.5.0' ],
50 silly audit   once: [ '1.4.0' ],
50 silly audit   'prebuild-install': [ '7.1.1' ],
50 silly audit   pump: [ '3.0.0' ],
50 silly audit   rc: [ '1.2.8' ],
50 silly audit   'readable-stream': [ '3.6.0' ],
50 silly audit   'safe-buffer': [ '5.2.1' ],
50 silly audit   semver: [ '7.3.7' ],
50 silly audit   sharp: [ '0.31.1' ],
50 silly audit   'simple-concat': [ '1.0.1' ],
50 silly audit   'simple-get': [ '4.0.1' ],
50 silly audit   'simple-swizzle': [ '0.2.2' ],
50 silly audit   string_decoder: [ '1.3.0' ],
50 silly audit   'strip-json-comments': [ '2.0.1' ],
50 silly audit   'tar-fs': [ '2.1.1' ],
50 silly audit   'tar-stream': [ '2.2.0' ],
50 silly audit   'tunnel-agent': [ '0.6.0' ],
50 silly audit   'uiohook-napi': [ '1.5.0' ],
50 silly audit   'util-deprecate': [ '1.0.2' ],
50 silly audit   wrappy: [ '1.0.2' ],
50 silly audit   yallist: [ '4.0.0' ]
50 silly audit }
51 timing reify:unpack Completed in 2ms
52 timing reify:unretire Completed in 0ms
53 timing build:queue Completed in 0ms
54 timing build:deps Completed in 0ms
55 timing build Completed in 0ms
56 timing reify:build Completed in 0ms
57 timing reify:trash Completed in 0ms
58 timing reify:save Completed in 11ms
59 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 408ms
60 timing auditReport:getReport Completed in 411ms
61 silly audit report {}
62 timing auditReport:init Completed in 0ms
63 timing reify:audit Completed in 412ms
64 timing reify Completed in 492ms
65 timing command:i Completed in 19411ms
66 verbose stack Error: command failed
66 verbose stack     at ChildProcess.<anonymous> (C:\Users\ch3rn1k\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:63:27)
66 verbose stack     at ChildProcess.emit (node:events:526:28)
66 verbose stack     at maybeClose (node:internal/child_process:1092:16)
66 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
67 verbose pkgid [email protected]
68 verbose cwd G:\Work\...\release\app
69 verbose Windows_NT 10.0.22000
70 verbose node v16.14.2
71 verbose npm  v8.16.0
72 error code 1
73 error path G:\Work\...\release\app
74 error command failed
75 error command C:\WINDOWS\system32\cmd.exe /d /s /c C:\Users\ch3rn1k\AppData\Local\Temp\postinstall-93b4ef44.cmd
76 verbose exit 1
77 timing npm Completed in 19523ms
78 verbose code 1
79 error A complete log of this run can be found in:
79 error     C:\Users\ch3rn1k\AppData\Local\npm-cache\_logs\2022-10-07T18_35_21_166Z-debug-0.log

@ch3rn1k
Copy link
Author

ch3rn1k commented Oct 7, 2022

⠙ Building module: native-keymap, Completed: 2Выполняется последовательная сборка проектов в этом решении. Чтобы включить параллельную сборку, добавьте параметр "/m".
⠏ Building module: native-keymap, Completed: 2  string_conversion.cc
⠹ Building module: native-keymap, Completed: 2  keymapping.cc
⠦ Building module: native-keymap, Completed: 2c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-callbacks.h(221): error C2062: тип "int" не требуется [G:\Work\...\release\app\node_modules\native
-keymap\build\keymapping.vcxproj]
c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-callbacks.h(335): error C2062: тип "int" не требуется [G:\Work\...\release\app\node_modules\native 
-keymap\build\keymapping.vcxproj]
c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-isolate.h(292): error C3646: legacy_oom_error_callback: неизвестный спецификатор переопределения [G:\Work\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-isolate.h(292): error C4430: отсутствует спецификатор типа - предполагается int. Примечание. C++ не поддерживает i 
nt по умолчанию [G:\Work\...\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-isolate.h(1482): error C2061: синтаксическая ошибка: идентификатор "LegacyOOMErrorCallback" [G:\Work\majestic-bind 
er-bot\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-isolate.h(1545): error C2061: синтаксическая ошибка: идентификатор "WasmDynamicTieringEnabledCallback" [G:\Work\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
c:\users\ch3rn1k\.electron-gyp\20.1.3\include\node\v8-initialization.h(290): error C2061: синтаксическая ошибка: идентификатор "LegacyOOMErrorCallback" [G:\Work\release\app\node_modules\native-keymap\build\keymapping.vcxproj]
✖ Rebuild Failed

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'G:\Work\...\release\app\node_modules\native-keymap'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1



Error: node-gyp failed to rebuild 'G:\Work\...\release\app\node_modules\native-keymap'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1


    at NodeGyp.rebuildModule (G:\Work\...\node_modules\electron-rebuild\lib\src\module-type\node-gyp.js:120:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ModuleRebuilder.rebuildNodeGypModule (G:\Work\...\node_modules\electron-rebuild\lib\src\module-rebuilder.js:98:9)
    at async ModuleRebuilder.rebuild (G:\Work\...\node_modules\electron-rebuild\lib\src\module-rebuilder.js:128:14)
    at async Rebuilder.rebuildModuleAt (G:\Work\...\node_modules\electron-rebuild\lib\src\rebuild.js:149:13)
    at async Rebuilder.rebuild (G:\Work\...\node_modules\electron-rebuild\lib\src\rebuild.js:112:17)
    at async G:\Work\...\node_modules\electron-rebuild\lib\src\cli.js:158:9
Error: Command failed: ..\..\node_modules\.bin\electron-rebuild --force --types prod,dev,optional --module-dir .
    at checkExecSyncError (node:child_process:828:11)
    at execSync (node:child_process:902:15)
    at Object.<anonymous> (G:\Work\...\.erb\scripts\electron-rebuild.js:16:11)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Module.m._compile (G:\Work\...\node_modules\ts-node\src\index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Object.require.extensions.<computed> [as .js] (G:\Work\...\node_modules\ts-node\src\index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  status: 4294967295,
  signal: null,
  output: [ null, null, null ],
  pid: 52616,
  stdout: null,
  stderr: null
}

@alexdima
Copy link
Member

This sometimes happens to me on Windows when the v8.h headers are not downloaded correctly. Have you tried deleting c:\users\ch3rn1k\.electron-gyp\20.1.3 ?

@alexdima alexdima added the info-needed Issue requires more information from poster label Oct 11, 2022
@carterbs
Copy link

@alexdima I'm also having issues with the latest chromium headers and electron-builder install-app-deps .

The error is a failed build becuase of v8 headers using c++17 features. Here's a sample of the errors.

 CXX(target) Release/obj.target/keymapping/src/string_conversion.o
  CXX(target) Release/obj.target/keymapping/src/keymapping.o
In file included from ../src/keymapping.cc:6:
In file included from /Users/brad.carter/.electron-gyp/21.1.0/include/node/node.h:69:
In file included from /Users/brad.carter/.electron-gyp/21.1.0/include/node/v8.h:24:
In file included from /Users/brad.carter/.electron-gyp/21.1.0/include/node/v8-array-buffer.h:12:
In file included from /Users/brad.carter/.electron-gyp/21.1.0/include/node/v8-local-handle.h:12:
/Users/brad.carter/.electron-gyp/21.1.0/include/node/v8-internal.h:471:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
SHARED_EXTERNAL_POINTER_TAGS(CHECK_SHARED_EXTERNAL_POINTER_TAGS)
/Users/brad.carter/.electron-gyp/21.1.0/include/node/v8-internal.h:472:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/brad.carter/.electron-gyp/21.1.0/include/node/v8-internal.h:472:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/brad.carter/.electron-gyp/21.1.0/include/node/v8-internal.h:472:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/brad.carter/.electron-gyp/21.1.0/include/node/v8-internal.h:472:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/brad.carter/.electron-gyp/21.1.0/include/node/v8-internal.h:472:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/brad.carter/.electron-gyp/21.1.0/include/node/v8-internal.h:472:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/brad.carter/.electron-gyp/21.1.0/include/node/v8-internal.h:655:61: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]

I've done a good bit of investigation of this, because I couldn't figure out where the problem was coming from.

electron-builder install-app-deps sets several NPM environment variables.

Here are a few of them.

disturl =  https://electronjs.org/headers
fallback_to_build = true
platform = darwin 
runtime = electron
target = 21.1.0
target_arch = arm64  
target_libc = unknown   
target_platform = darwin
update_binary = true

Presumably this is to build native dependencies against various electron targets.

If I clone native-keymap, set the variables above in .npmrc, and try npm install in the native-keymap, I get the same compiler errors that I get in my app's repo.

if I add

 "xcode_settings": {
        'OTHER_CPLUSPLUSFLAGS': ['-std=c++17', '-stdlib=libc++'],
      }

to binding.gyp, things compile fine.

Windows fails for the same reasons, but I haven't gotten the proper flags yet. I'm going to do that shortly and then put in a PR that links to this comment. Hopefully all of that is clear enough.

@ch3rn1k
Copy link
Author

ch3rn1k commented Oct 28, 2022

Well, my fast fix was to comment error lines. Bad, but everything is works and compiles 🫠

@deepak1556
Copy link
Contributor

@ch3rn1k are you using electron-rebuild >= v3.2.9 ?

@ch3rn1k
Copy link
Author

ch3rn1k commented Apr 12, 2023

@ch3rn1k are you using electron-rebuild >= v3.2.9 ?

Previously - yes. Lster I have moved to @electron/rebuild 3.2.10.
For now problem bumped again. If I try to use with latest electron >24.0.0 I'm getting build error
With electron 23.2.2 everything is okay

C:\Users\qwerty\.electron-gyp\24.1.0\include\node\v8-platform.h(1092,17): error C4244: return: �८�ࠧ������ "double" � "int64_t", �������� ����� ������ [D:gg\release\app\node_modules\native-keymap\build\keymapping.vcxproj]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants