eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.99k stars 2.5k forks source link

Electron-rebuild error on Theia 1.15.0 #9816

Closed cenkce closed 3 years ago

cenkce commented 3 years ago

Bug Description:,

I received an error when build using theia@1.5.0

Steps to Reproduce:

  1. Upgrade theia modules to 1.5.0
  2. install modules
  3. Run theia rebuild:electron
Log ``` An unhandled error occurred inside electron-rebuild gyp info it worked if it ends with ok gyp info using node-gyp@6.1.0 gyp info using node@12.20.2 | win32 | x64 gyp info find Python using Python version 3.9.6 found at "C:\Python39\python.exe" gyp info find VS using VS2019 (16.10.31424.327) found at: gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" gyp info find VS run with --verbose for detailed information gyp info spawn C:\Python39\python.exe gyp info spawn args [ gyp info spawn args 'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\elect gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-I', gyp info spawn args 'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\keyta gyp info spawn args '-I', gyp info spawn args 'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\elect gyp info spawn args '-I', gyp info spawn args 'C:\\Users\\90532\\.electron-gyp\\9.3.2\\include\\node\\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\\Users\\90532\\.electron-gyp\\9.3.2', gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\90532\\Documents\\smartface-electron-ide\\node gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\90532\\\\.electron-gyp\\\\9.3.2\\\\<(targ gyp info spawn args '-Dmodule_root_dir=C:\\Users\\90532\\Documents\\smartface-electron-ide\\n gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\keyta gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\B gyp info spawn args [ gyp info spawn args 'build/binding.sln', gyp info spawn args '/clp:Verbosity=minimal', gyp info spawn args '/nologo', gyp info spawn args '/p:Configuration=Release;Platform=x64' gyp info spawn args ] Building the projects in this solution one at a time. To enable parallel build, please add the async.cc main.cc keytar_win.cc win_delay_load_hook.cc C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electro C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apiifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elec C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apitifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-ele C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electr C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apiifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-ele C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apitifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-el C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\C gyp ERR! stack at ChildProcess.onExit (C:\Users\90532\Documents\smartface-electron-ide\node gyp ERR! stack at ChildProcess.emit (events.js:314:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) gyp ERR! System Windows_NT 10.0.19043 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\90532\\Documents\\smartface-in\\node-gyp.js" "rebuild" "--target=9.3.2" "--arch=x64" "--dist-url=https://www.electronjs.org gyp ERR! cwd C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar gyp ERR! node -v v12.20.2 gyp ERR! node-gyp -v v6.1.0 gyp ERR! not ok Failed with exit code: 1 Error: gyp info it worked if it ends with ok gyp info using node-gyp@6.1.0 gyp info using node@12.20.2 | win32 | x64 gyp info find Python using Python version 3.9.6 found at "C:\Python39\python.exe" gyp info find VS using VS2019 (16.10.31424.327) found at: gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" gyp info find VS run with --verbose for detailed information gyp info spawn C:\Python39\python.exe gyp info spawn args [ gyp info spawn args 'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\elect gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-I', gyp info spawn args 'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\keyta gyp info spawn args '-I', gyp info spawn args 'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\elect gyp info spawn args '-I', gyp info spawn args 'C:\\Users\\90532\\.electron-gyp\\9.3.2\\include\\node\\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\\Users\\90532\\.electron-gyp\\9.3.2', gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\90532\\Documents\\smartface-electron-ide\\node gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\90532\\\\.electron-gyp\\\\9.3.2\\\\<(targ gyp info spawn args '-Dmodule_root_dir=C:\\Users\\90532\\Documents\\smartface-electron-ide\\n gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\keyta gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\B gyp info spawn args [ gyp info spawn args 'build/binding.sln', gyp info spawn args '/clp:Verbosity=minimal', gyp info spawn args '/nologo', gyp info spawn args '/p:Configuration=Release;Platform=x64' gyp info spawn args ] Building the projects in this solution one at a time. To enable parallel build, please add the async.cc main.cc keytar_win.cc win_delay_load_hook.cc C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electro C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apiifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elec C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apitifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-ele C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electr C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apiifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-ele C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apitifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-el C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\C gyp ERR! stack at ChildProcess.onExit (C:\Users\90532\Documents\smartface-electron-ide\node gyp ERR! stack at ChildProcess.emit (events.js:314:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) gyp ERR! System Windows_NT 10.0.19043 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\90532\\Documents\\smartface-in\\node-gyp.js" "rebuild" "--target=9.3.2" "--arch=x64" "--dist-url=https://www.electronjs.org gyp ERR! cwd C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar gyp ERR! node -v v12.20.2 gyp ERR! node-gyp -v v6.1.0 gyp ERR! not ok ```

Additional Information

vince-fugnitto commented 3 years ago

@cenkce can you confirm if 1.16.0 had the same error? In 1.16.0 we downgraded the version of keytar for broader compatibility:

Alternatively you can add a resolution to pin the version of keytar being used.

cenkce commented 3 years ago

yarn also gives an error for 1.16.0

error https://registry.yarnpkg.com/@theia/cli/-/cli-1.16.0.tgz: Integrity check failed for "@theia/cli" (computed integrity doesn't match our records, got "sha512-biIq7Pjl7MGO3nV7G5aJ1uymTDnJOJZtK4Z0IMWSqL59mD+PUvqvTBpPa7nyr1RJdcmPWWs2x9PG8Qube5pSvg== sha1-NMV0DQ4fhmusQLA56tAss/MMUB0=")
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
vince-fugnitto commented 3 years ago

yarn also gives an error for 1.16.0

error https://registry.yarnpkg.com/@theia/cli/-/cli-1.16.0.tgz: Integrity check failed for "@theia/cli" (computed integrity doesn't match our records, got "sha512-biIq7Pjl7MGO3nV7G5aJ1uymTDnJOJZtK4Z0IMWSqL59mD+PUvqvTBpPa7nyr1RJdcmPWWs2x9PG8Qube5pSvg== sha1-NMV0DQ4fhmusQLA56tAss/MMUB0=")
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

The error seems unrelated to the actual problem, can you try:

I verified myself using master and everything seems to work correctly.

cenkce commented 3 years ago

It's caused by yarn-lock clear it then installed all modules

cenkce commented 3 years ago

Rebuild success on 1.16.0

vince-fugnitto commented 3 years ago

Rebuild success on 1.16.0

Thanks for the follow-up! As for 1.15.0 it might just be that keytar needs a resolution like so:

"resolutions": {
  "**/keytar": "7.6.0",
}
cenkce commented 3 years ago

Thanks

vince-fugnitto commented 3 years ago

@cenkce please feel free to close the issue if its resolved, or comment if the problems persist :+1: