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

"C:\Program" is not a command #2558

Closed
eiskalteschatten opened this issue Nov 25, 2021 · 1 comment
Closed

"C:\Program" is not a command #2558

eiskalteschatten opened this issue Nov 25, 2021 · 1 comment
Labels

Comments

@eiskalteschatten
Copy link

eiskalteschatten commented Nov 25, 2021

  • Node Version: Node 16.13.0; npm 8.1.0
  • Platform: Windows 10 version 21H2
  • Compiler: MSBuild 2019 (installed using the Windows SDK version 10.0.19041.0)
  • Module: sqlite3
Verbose output (from npm or node-gyp):
electron-builder install-app-deps

  • electron-builder  version=22.14.5
  • loaded configuration  file=package.json ("build" field)
  • loaded parent configuration  preset=react-cra
  • rebuilding native dependencies  dependencies=sqlite3@5.0.2 platform=win32 arch=x64
  ⨯ cannot execute  cause=exit status 1
                    errorOut=npm verb cli [
    npm verb cli   'C:\\Program Files\\nodejs\\node.exe',
    npm verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
    npm verb cli   'rebuild',
    npm verb cli   'sqlite3@5.0.2'
    npm verb cli ]
    npm info using npm@8.1.0
    npm info using node@v16.13.0
    npm timing npm:load:whichnode Completed in 1ms
    npm timing config:load:defaults Completed in 2ms
    npm timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms
    npm timing config:load:builtin Completed in 3ms
    npm timing config:load:cli Completed in 1ms
    npm timing config:load:env Completed in 2ms
    npm timing config:load:file:E:\Code\mailcoach-electron\.npmrc Completed in 0ms
    npm timing config:load:project Completed in 1ms
    npm timing config:load:file:C:\Users\alexs\.npmrc Completed in 1ms
    npm timing config:load:user Completed in 1ms
    npm timing config:load:file:C:\Users\alexs\AppData\Roaming\npm\etc\npmrc Completed in 0ms
    npm timing config:load:global Completed in 0ms
    npm timing config:load:validate Completed in 2ms
    npm timing config:load:credentials Completed in 1ms
    npm timing config:load:setEnvs Completed in 1ms
    npm timing config:load Completed in 15ms
    npm timing npm:load:configload Completed in 15ms
    npm timing npm:load:setTitle Completed in 0ms
    npm timing npm:load:setupLog Completed in 0ms
    npm timing config:load:flatten Completed in 5ms
    npm timing npm:load:cleanupLog Completed in 3ms
    npm timing npm:load:configScope Completed in 0ms
    npm timing npm:load:projectScope Completed in 1ms
    npm timing npm:load Completed in 30ms
    npm timing arborist:ctor Completed in 1ms
    npm timing arborist:ctor Completed in 0ms
    npm timing build:queue Completed in 1ms
    npm info run sqlite3@5.0.2 install node_modules/sqlite3 node-pre-gyp install --fallback-to-build
    npm info run sqlite3@5.0.2 install { code: 1, signal: null }
    npm timing command:rebuild Completed in 7561ms
    npm verb stack Error: command failed
    npm verb stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
    npm verb stack     at ChildProcess.emit (node:events:390:28)
    npm verb stack     at maybeClose (node:internal/child_process:1064:16)
    npm verb stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
    npm verb pkgid sqlite3@5.0.2
    npm verb cwd E:\Code\mailcoach-electron
    npm verb Windows_NT 10.0.19044
    npm verb argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" 
"rebuild" "sqlite3@5.0.2"
    npm verb node v16.13.0
    npm verb npm  v8.1.0
    npm ERR! code 1
    npm ERR! path E:\Code\mailcoach-electron\node_modules\sqlite3
    npm ERR! command failed
    npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
    npm ERR! Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu erm�glichen, m�ssen Sie den Schalter "-m" hinzuf�gen.
    npm ERR! Der Buildvorgang wurde am 25.11.2021 23:07:28 gestartet.
    npm ERR! Projekt "E:\Code\mailcoach-electron\node_modules\sqlite3\build\binding.sln" auf Knoten "1" (Standardziele).    npm ERR! ValidateSolutionConfiguration:
    npm ERR!   Die Projektmappenkonfiguration "Release|x64" wird erstellt.
    npm ERR! Das Projekt "E:\Code\mailcoach-electron\node_modules\sqlite3\build\binding.sln" (1) erstellt "E:\Code\mailcoach-electron\node_modules\sqlite3\build\action_after_build.vcxproj.metaproj" (2) auf Knoten "1" (Standardziele).       
    npm ERR! Das Projekt "E:\Code\mailcoach-electron\node_modules\sqlite3\build\action_after_build.vcxproj.metaproj" (2) erstellt "E:\Code\mailcoach-electron\node_modules\sqlite3\build\node_sqlite3.vcxproj.metaproj" (3) auf Knoten "1" (Standardziele).
    npm ERR! Das Projekt "E:\Code\mailcoach-electron\node_modules\sqlite3\build\node_sqlite3.vcxproj.metaproj" (3) erstellt "E:\Code\mailcoach-electron\node_modules\sqlite3\build\node_modules\node-addon-api\nothing.vcxproj" (4) auf Knoten "1" (Standardziele).
    npm ERR! PrepareForBuild:
    npm ERR!   Das Verzeichnis "Release\obj\nothing\" wird erstellt.
    npm ERR!   Das Verzeichnis "E:\Code\mailcoach-electron\node_modules\sqlite3\build\Release\" wird erstellt.
    npm ERR!   Das Verzeichnis "Release\obj\nothing\nothing.tlog\" wird erstellt.
    npm ERR! InitializeBuildStatus:
    npm ERR!   "Release\obj\nothing\nothing.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.   
    npm ERR! MakeDirsForCl:
    npm ERR!   Das Verzeichnis "E:\Code\mailcoach-electron\node_modules\sqlite3\build\node_modules\node-addon-api\Release\obj\nothing\node_modules\node-addon-api" wird erstellt.
    npm ERR! ClCompile:
    npm ERR!   C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\CL.exe /c /I"C:\Users\alexs\.electron-gyp\16.0.1\include\node" /I"C:\Users\alexs\.electron-gyp\16.0.1\src" /I"C:\Users\alexs\.electron-gyp\16.0.1\deps\openssl\config" /I"C:\Users\alexs\.electron-gyp\16.0.1\deps\openssl\openssl\include" /I"C:\Users\alexs\.electron-gyp\16.0.1\deps\uv\include" /I"C:\Users\alexs\.electron-gyp\16.0.1\deps\zlib" /I"C:\Users\alexs\.electron-gyp\16.0.1\deps\v8\include" /Z7 /nologo /W3 /WX- /diagnostics:column /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=nothing /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D V8_DEPRECATION_WARNINGS /D V8_IMMINENT_DEPRECATION_WARNINGS /D _GLIBCXX_USE_CXX11_ABI=1 /D V8_COMPRESS_POINTERS /D V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE /D V8_31BIT_SMIS_ON_64BIT_ARCH /D V8_REVERSE_JSARGS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D OPENSSL_NO_PINSHARED /D OPENSSL_THREADS /D "HOST_BINARY=\"node.exe\"" /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\nothing\\node_modules\node-addon-api\nothing.obj" /Fd"E:\Code\mailcoach-electron\node_modules\sqlite3\build\Release\nothing.pdb" /external:W3 /Gd /TC /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue "..\..\..\node_modules\node-addon-api\nothing.c"
    npm ERR!   nothing.c
    npm ERR!   C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\CL.exe /c /I"C:\Users\alexs\.electron-gyp\16.0.1\include\node" /I"C:\Users\alexs\.electron-gyp\16.0.1\src" /I"C:\Users\alexs\.electron-gyp\16.0.1\deps\openssl\config" /I"C:\Users\alexs\.electron-gyp\16.0.1\deps\openssl\openssl\include" /I"C:\Users\alexs\.electron-gyp\16.0.1\deps\uv\include" /I"C:\Users\alexs\.electron-gyp\16.0.1\deps\zlib" /I"C:\Users\alexs\.electron-gyp\16.0.1\deps\v8\include" /Z7 /nologo /W3 /WX- /diagnostics:column /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=nothing /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D V8_DEPRECATION_WARNINGS /D V8_IMMINENT_DEPRECATION_WARNINGS /D _GLIBCXX_USE_CXX11_ABI=1 /D V8_COMPRESS_POINTERS /D V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE /D V8_31BIT_SMIS_ON_64BIT_ARCH /D V8_REVERSE_JSARGS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D OPENSSL_NO_PINSHARED /D OPENSSL_THREADS /D "HOST_BINARY=\"node.exe\"" /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\nothing\\" /Fd"E:\Code\mailcoach-electron\node_modules\sqlite3\build\Release\nothing.pdb" /external:W3 /Gd /TP /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.cc"
    npm ERR!   win_delay_load_hook.cc
    npm ERR! Lib:
    npm ERR!   C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\Lib.exe /OUT:"E:\Code\mailcoach-electron\node_modules\sqlite3\build\Release\nothing.lib" /NOLOGO /MACHINE:X64 /LTCG:INCREMENTAL Release\obj\nothing\win_delay_load_hook.obj
    npm ERR!   "Release\obj\nothing\\node_modules\node-addon-api\nothing.obj"
    npm ERR!   nothing.vcxproj -> E:\Code\mailcoach-electron\node_modules\sqlite3\build\Release\\nothing.lib
    npm ERR! FinalizeBuildStatus:
    npm ERR!   Die Datei "Release\obj\nothing\nothing.tlog\unsuccessfulbuild" wird gel�scht.
    npm ERR!   Aktualisieren des Timestamps von "Release\obj\nothing\nothing.tlog\nothing.lastbuildstate".
    npm ERR! Die Erstellung von Projekt "E:\Code\mailcoach-electron\node_modules\sqlite3\build\node_modules\node-addon-api\nothing.vcxproj" ist abgeschlossen (Standardziele).
    npm ERR! Das Projekt "E:\Code\mailcoach-electron\node_modules\sqlite3\build\node_sqlite3.vcxproj.metaproj" (3) erstellt "E:\Code\mailcoach-electron\node_modules\sqlite3\build\deps\action_before_build.vcxproj" (5) auf Knoten "1" (Standardziele).
    npm ERR! PrepareForBuild:
    npm ERR!   Das Verzeichnis "Release\obj\action_before_build\" wird erstellt.
    npm ERR!   Das Verzeichnis "Release\obj\action_before_build\action_b.F5E1FA9B.tlog\" wird erstellt.
    npm ERR! InitializeBuildStatus:
    npm ERR!   "Release\obj\action_before_build\action_b.F5E1FA9B.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
    npm ERR! ComputeCustomBuildOutput:
    npm ERR!   Das Verzeichnis "E:\Code\mailcoach-electron\node_modules\sqlite3\build\Release\obj\global_intermediate\sqlite-autoconf-3340000\" wird erstellt.
    npm ERR! CustomBuild:
    npm ERR!   unpack_sqlite_dep
    npm ERR!   Der Befehl "C:\Program" ist entweder falsch geschrieben oder
    npm ERR!   konnte nicht gefunden werden.
    npm ERR! C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Msbuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Der benutzerdefinierte Build f�r "..\..\deps\sqlite-autoconf-3340000.tar.gz" wurde mit 
dem Code 1 beendet. [E:\Code\mailcoach-electron\node_modules\sqlite3\build\deps\action_before_build.vcxproj]
    npm ERR! Die Erstellung des Projekts "E:\Code\mailcoach-electron\node_modules\sqlite3\build\deps\action_before_build.vcxproj" ist abgeschlossen (Standardziele) -- FEHLER.
    npm ERR! Die Erstellung des Projekts "E:\Code\mailcoach-electron\node_modules\sqlite3\build\node_sqlite3.vcxproj.metaproj" ist abgeschlossen (Standardziele) -- FEHLER.
    npm ERR! Die Erstellung des Projekts "E:\Code\mailcoach-electron\node_modules\sqlite3\build\action_after_build.vcxproj.metaproj" ist abgeschlossen (Standardziele) -- FEHLER.
    npm ERR! Die Erstellung des Projekts "E:\Code\mailcoach-electron\node_modules\sqlite3\build\binding.sln" ist abgeschlossen (Standardziele) -- FEHLER.
    npm ERR!
    npm ERR! Fehler beim Buildvorgang.
    npm ERR!
    npm ERR! "E:\Code\mailcoach-electron\node_modules\sqlite3\build\binding.sln" (Standardziel) (1) ->
    npm ERR! "E:\Code\mailcoach-electron\node_modules\sqlite3\build\action_after_build.vcxproj.metaproj" (Standardziel) 
(2) ->
    npm ERR! "E:\Code\mailcoach-electron\node_modules\sqlite3\build\node_sqlite3.vcxproj.metaproj" (Standardziel) (3) ->    npm ERR! "E:\Code\mailcoach-electron\node_modules\sqlite3\build\deps\action_before_build.vcxproj" (Standardziel) (5) ->
    npm ERR! (CustomBuild Ziel) ->
    npm ERR!   C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Msbuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Der benutzerdefinierte Build f�r "..\..\deps\sqlite-autoconf-3340000.tar.gz" wurde mit dem Code 1 beendet. [E:\Code\mailcoach-electron\node_modules\sqlite3\build\deps\action_before_build.vcxproj]
    npm ERR!
    npm ERR!     0 Warnung(en)
    npm ERR!     1 Fehler
    npm ERR!
    npm ERR! Verstrichene Zeit 00:00:02.06
    npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=E:\Code\mailcoach-electron\node_modules\sqlite3\lib\binding\napi-v3-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=E:\Code\mailcoach-electron\node_modules\sqlite3\lib\binding\napi-v3-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
    npm ERR! node-pre-gyp info it worked if it ends with ok
    npm ERR! node-pre-gyp verb cli [
    npm ERR! node-pre-gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
    npm ERR! node-pre-gyp verb cli   'E:\\Code\\mailcoach-electron\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp',     
    npm ERR! node-pre-gyp verb cli   'install',
    npm ERR! node-pre-gyp verb cli   '--fallback-to-build'
    npm ERR! node-pre-gyp verb cli ]
    npm ERR! node-pre-gyp info using node-pre-gyp@0.11.0
    npm ERR! node-pre-gyp info using node@16.13.0 | win32 | x64
    npm ERR! node-pre-gyp verb command install [ 'napi_build_version=3' ]
    npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
    npm ERR! node-pre-gyp info build requesting source compile
    npm ERR! node-pre-gyp verb command build [ 'rebuild', 'napi_build_version=3' ]
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp verb cli [
    npm ERR! gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
    npm ERR! gyp verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js',   
    npm ERR! gyp verb cli   'clean'
    npm ERR! gyp verb cli ]
    npm ERR! gyp info using node-gyp@8.2.0
    npm ERR! gyp info using node@16.13.0 | win32 | x64
    npm ERR! gyp verb command clean []
    npm ERR! gyp verb clean removing "build" directory
    npm ERR! gyp info ok
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp verb cli [
    npm ERR! gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
    npm ERR! gyp verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js',   
    npm ERR! gyp verb cli   'configure',
    npm ERR! gyp verb cli   '--fallback-to-build',
    npm ERR! gyp verb cli   '--module=E:\\Code\\mailcoach-electron\\node_modules\\sqlite3\\lib\\binding\\napi-v3-win32-x64\\node_sqlite3.node',
    npm ERR! gyp verb cli   '--module_name=node_sqlite3',
    npm ERR! gyp verb cli   '--module_path=E:\\Code\\mailcoach-electron\\node_modules\\sqlite3\\lib\\binding\\napi-v3-win32-x64',
    npm ERR! gyp verb cli   '--napi_version=8',
    npm ERR! gyp verb cli   '--node_abi_napi=napi',
    npm ERR! gyp verb cli   '--napi_build_version=3',
    npm ERR! gyp verb cli   '--node_napi_label=napi-v3',
    npm ERR! gyp verb cli   '--python=C:\\Program Files\\Python310\\python.exe',
    npm ERR! gyp verb cli   '--msvs_version=2019'
    npm ERR! gyp verb cli ]
    npm ERR! gyp info using node-gyp@8.2.0
    npm ERR! gyp info using node@16.13.0 | win32 | x64
    npm ERR! gyp verb command configure []
    npm ERR! gyp verb download using dist-url https://electronjs.org/headers
    npm ERR! gyp verb find Python checking Python explicitly set from command line or npm configuration
    npm ERR! gyp verb find Python - "--python=" or "npm config get python" is "C:\Program Files\Python310\python.exe"   
    npm ERR! gyp verb find Python - executing "C:\Program Files\Python310\python.exe" to get executable path
    npm ERR! gyp verb find Python - executable path is "C:\Program Files\Python310\python.exe"
    npm ERR! gyp verb find Python - executing "C:\Program Files\Python310\python.exe" to get version
    npm ERR! gyp verb find Python - version is "3.10.0"
    npm ERR! gyp info find Python using Python version 3.10.0 found at "C:\Program Files\Python310\python.exe"
    npm ERR! gyp verb get node dir compiling against --target node version: 16.0.1
    npm ERR! gyp verb command install [ '16.0.1' ]
    npm ERR! gyp verb download using dist-url https://electronjs.org/headers
    npm ERR! gyp verb install input version string "16.0.1"
    npm ERR! gyp verb install installing version: 16.0.1
    npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
    npm ERR! gyp verb install version is already installed, need to check "installVersion"
    npm ERR! gyp verb got "installVersion" 9
    npm ERR! gyp verb needs "installVersion" 9
    npm ERR! gyp verb install version is good
    npm ERR! gyp verb get node dir target node version installed: 16.0.1
    npm ERR! gyp verb build dir attempting to create "build" dir: E:\Code\mailcoach-electron\node_modules\sqlite3\build 
    npm ERR! gyp verb build dir "build" dir needed to be created? Yes
    npm ERR! gyp verb find VS msvs_version was set from command line or npm config
    npm ERR! gyp verb find VS - looking for Visual Studio version 2019
    npm ERR! gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
    npm ERR! gyp verb find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Community"
    npm ERR! gyp verb find VS checking VS2019 (16.11.31911.196) found at:
    npm ERR! gyp verb find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
    npm ERR! gyp verb find VS - found "Visual Studio C++ core features"
    npm ERR! gyp verb find VS - found VC++ toolset: v142
    npm ERR! gyp verb find VS - found Windows SDK: 10.0.19041.0
    npm ERR! gyp info find VS using VS2019 (16.11.31911.196) found at:
    npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
    npm ERR! gyp info find VS run with --verbose for detailed information
    npm ERR! gyp verb build/config.gypi creating config file
    npm ERR! gyp verb build/config.gypi writing out config file: E:\Code\mailcoach-electron\node_modules\sqlite3\build\config.gypi
    npm ERR! gyp verb config.gypi checking for gypi file: E:\Code\mailcoach-electron\node_modules\sqlite3\config.gypi   
    npm ERR! gyp verb common.gypi checking for gypi file: E:\Code\mailcoach-electron\node_modules\sqlite3\common.gypi   
    npm ERR! gyp verb gyp gyp format was not specified; forcing "msvs"
    npm ERR! gyp info spawn C:\Program Files\Python310\python.exe
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\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:\\Code\\mailcoach-electron\\node_modules\\sqlite3\\build\\config.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',  
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   'C:\\Users\\alexs\\.electron-gyp\\16.0.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\\alexs\\.electron-gyp\\16.0.1',
    npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
    npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\alexs\\\\.electron-gyp\\\\16.0.1\\\\<(target_arch)\\\\node.lib',
    npm ERR! gyp info spawn args   '-Dmodule_root_dir=E:\\Code\\mailcoach-electron\\node_modules\\sqlite3',
    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:\\Code\\mailcoach-electron\\node_modules\\sqlite3\\build',
    npm ERR! gyp info spawn args   '-Goutput_dir=.'
    npm ERR! gyp info spawn args ]
    npm ERR! gyp info ok
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp verb cli [
    npm ERR! gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
    npm ERR! gyp verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js',   
    npm ERR! gyp verb cli   'build',
    npm ERR! gyp verb cli   '--fallback-to-build',
    npm ERR! gyp verb cli   '--module=E:\\Code\\mailcoach-electron\\node_modules\\sqlite3\\lib\\binding\\napi-v3-win32-x64\\node_sqlite3.node',
    npm ERR! gyp verb cli   '--module_name=node_sqlite3',
    npm ERR! gyp verb cli   '--module_path=E:\\Code\\mailcoach-electron\\node_modules\\sqlite3\\lib\\binding\\napi-v3-win32-x64',
    npm ERR! gyp verb cli   '--napi_version=8',
    npm ERR! gyp verb cli   '--node_abi_napi=napi',
    npm ERR! gyp verb cli   '--napi_build_version=3',
    npm ERR! gyp verb cli   '--node_napi_label=napi-v3'
    npm ERR! gyp verb cli ]
    npm ERR! gyp info using node-gyp@8.2.0
    npm ERR! gyp info using node@16.13.0 | win32 | x64
    npm ERR! gyp verb command build []
    npm ERR! gyp verb build type Release
    npm ERR! gyp verb architecture x64
    npm ERR! gyp verb node dev dir C:\Users\alexs\.electron-gyp\16.0.1
    npm ERR! gyp verb found first Solution file build/binding.sln
    npm ERR! gyp verb using MSBuild: C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe
    npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe     
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args   'build/binding.sln',
    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\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe` failed with exit code: 1
    npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
    npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
    npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
    npm ERR! gyp ERR! System Windows_NT 10.0.19044
    npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=E:\\Code\\mailcoach-electron\\node_modules\\sqlite3\\lib\\binding\\napi-v3-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=E:\\Code\\mailcoach-electron\\node_modules\\sqlite3\\lib\\binding\\napi-v3-win32-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
    npm ERR! gyp ERR! cwd E:\Code\mailcoach-electron\node_modules\sqlite3
    npm ERR! gyp ERR! node -v v16.13.0
    npm ERR! gyp ERR! node-gyp -v v8.2.0
    npm ERR! gyp ERR! not ok
    npm ERR! node-pre-gyp ERR! build error
    npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=E:\Code\mailcoach-electron\node_modules\sqlite3\lib\binding\napi-v3-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=E:\Code\mailcoach-electron\node_modules\sqlite3\lib\binding\napi-v3-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
    npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (E:\Code\mailcoach-electron\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
    npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
    npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
    npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)     
    npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19044
    npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\Code\\mailcoach-electron\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
    npm ERR! node-pre-gyp ERR! cwd E:\Code\mailcoach-electron\node_modules\sqlite3
    npm ERR! node-pre-gyp ERR! node -v v16.13.0
    npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
    npm ERR! node-pre-gyp ERR! not ok
    npm verb exit 1
    npm timing npm Completed in 8123ms
    npm verb unfinished npm timer build 1637878044434
    npm verb unfinished npm timer build:deps 1637878044435
    npm verb unfinished npm timer build:run:install 1637878044437
    npm verb unfinished npm timer build:run:install:node_modules/sqlite3 1637878044437
    npm verb code 1

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\alexs\AppData\Local\npm-cache\_logs\2021-11-25T22_07_30_175Z-debug.log

                    command='C:\Program Files\nodejs\node.exe' 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js' rebuild sqlite3@5.0.2
                    workingDir=
npm timing command:install Completed in 15988ms
npm verb stack Error: command failed
npm verb stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
npm verb stack     at ChildProcess.emit (node:events:390:28)
npm verb stack     at maybeClose (node:internal/child_process:1064:16)
npm verb stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm verb pkgid mailcoach@1.0.0
npm verb cwd E:\Code\mailcoach-electron
npm verb Windows_NT 10.0.19044
npm verb argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--verbose"
npm verb node v16.13.0
npm verb npm  v8.1.0
npm ERR! code 1
npm ERR! path E:\Code\mailcoach-electron
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c electron-builder install-app-deps
npm verb exit 1
npm timing npm Completed in 16534ms
npm verb code 1

I am trying to get an Electron project of mine that requires sqlite3 to run on Windows. node-gyp is able to find the correct version of the Windows SDK (in this case 2019; and I've already run npm config set msvs_version 2019), but isn't able to actually run anything because the Windows SDK is installed in the Program Files directory which has a space in it that isn't escaped or the path name isn't in double quotes. Hence the error saying that "C:\Program" is not a command.

Unfortunately, I only have the logs in German since my computer is in German. The actual error says:

    npm ERR!   Der Befehl "C:\Program" ist entweder falsch geschrieben oder
    npm ERR!   konnte nicht gefunden werden.

which translated means:

The command "C:\Program" is either written incorrectly or could not be found.

The project I am trying to build is here: https://github.com/eiskalteschatten/mailcoach-electron

It also works without a problem on macOS and on Ubuntu 20.04. I just can't get it to work on Windows.

Edit:
I forgot to mention that this problem occurs when I try to install sqlite3 with npm i. The issue is with the postinstall script which re-builds the native dependencies specifically against Electron's built-in version of Node (see https://webpack.electron.build/dependency-management#installing-native-node-modules).

@cclauss cclauss added the node-pre-gyp is unmaintained mapbox/node-pre-gyp#657 label Apr 11, 2024
@cclauss
Copy link
Contributor

cclauss commented Apr 11, 2024

Closing because node-pre-gyp is unmaintained

Please use the updated Windows setup... https://github.com/nodejs/node-gyp?tab=readme-ov-file#on-windows

@cclauss cclauss closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants