electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.46k stars 1.71k forks source link

Help pls! #8270

Open notzairdev opened 1 week ago

notzairdev commented 1 week ago

Hello!

Can anyone help me figure out why this error occurs? Yesterday it let me compile correctly, but today I try to compile my electron app but it doesn't work and instead I get this error:

electron-builder

• electron-builder version=24.13.3 os=10.0.22635 • loaded configuration file=package.json ("build" field) • writing effective config file=electrondist\builder-effective-config.yaml • rebuilding native dependencies dependencies=register-scheme@0.0.2 platform=win32 arch=x64 ⨯ cannot execute cause=exit status 1 errorOut=npm error code 1 npm error path C:\Users\PC1\Documents\HTML Proyects\Minecraft-Launcher\node_modules\register-scheme npm error command failed npm error command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@10.1.0 npm error gyp info using node@22.3.0 | win32 | x64 npm error gyp info find Python using Python version 3.12.4 found at "C:\Users\PC1\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe" npm error gyp ERR! find VS npm error gyp ERR! find VS msvs_version not set from command line or npm config npm error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details. npm error gyp ERR! find VS npm error gyp ERR! find VS Failure details: undefined npm error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details. npm error gyp ERR! find VS npm error gyp ERR! find VS Failure details: undefined npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21 npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21 npm error gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18 npm error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm error gyp ERR! find VS npm error gyp ERR! find VS ** npm error gyp ERR! find VS You need to install the latest version of Visual Studio npm error gyp ERR! find VS including the "Desktop development with C++" workload. npm error gyp ERR! find VS For more information consult the documentation at: npm error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm error gyp ERR! find VS ** npm error gyp ERR! find VS npm error gyp ERR! configure error npm error gyp ERR! stack Error: Could not find any Visual Studio installation to use npm error gyp ERR! stack at VisualStudioFinder.fail (C:\Users\PC1\Documents\HTML Proyects\Minecraft-Launcher\node_modules\node-gyp\lib\find-visualstudio.js:116:11) npm error gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Users\PC1\Documents\HTML Proyects\Minecraft-Launcher\node_modules\node-gyp\lib\find-visualstudio.js:72:17) npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm error gyp ERR! stack at async createBuildDir (C:\Users\PC1\Documents\HTML Proyects\Minecraft-Launcher\node_modules\node-gyp\lib\configure.js:95:26) npm error gyp ERR! stack at async run (C:\Users\PC1\Documents\HTML Proyects\Minecraft-Launcher\node_modules\node-gyp\bin\node-gyp.js:81:18) npm error gyp ERR! System Windows_NT 10.0.22635 npm error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\PC1\Documents\HTML Proyects\Minecraft-Launcher\node_modules\node-gyp\bin\node-gyp.js" "rebuild" npm error gyp ERR! cwd C:\Users\PC1\Documents\HTML Proyects\Minecraft-Launcher\node_modules\register-scheme npm error gyp ERR! node -v v22.3.0 npm error gyp ERR! node-gyp -v v10.1.0 npm error gyp ERR! not ok npm error A complete log of this run can be found in: C:\Users\PC1\AppData\Local\npm-cache_logs\2024-06-22T23_46_53_381Z-debug-0.log

                command='C:\Program Files\nodejs\node.exe' 'C:\Users\PC1\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js' rebuild register-scheme@0.0.2
                workingDir=
mmaietta commented 1 week ago

Might be worth trying out next alpha version of electron-builder. From an initial guess though, it looks like your node version was updated.

npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21
npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21
npm error gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18
npm error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
notzairdev commented 1 week ago

I will try the latest alpha of electron-builder and currently my version of NodeJs has not been updated, I am using 21.7.3