Closed
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
electron-builder can be build by npm(now), and the old yarn2 (last year), but when I use the new yarn3, it can't be built the deps.
I use the Electron and change the default builder package to electron-builder, it will be error when using yarn3:
https://github.com/electron/electron-quick-start
add those script in package.json:
"make": "electron-builder",
"postinstall": "electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps"
and add "electron-builder": "latest"
to devDependencies,
then, use the yarn
to download the deps, it will error.
S D:\Project\electron\electron-quick-start> yarn
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 2s 123ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ electron-quick-start@workspace:. must be built because it never has been before or the last one failed
➤ YN0009: │ electron-quick-start@workspace:. couldn't be built successfully (exit code 1, logs can be found here: C:\Users\ROADRU~1\AppData\Local\Temp\xfs-c0d01bb5\build.log)
➤ YN0000: └ Completed in 0s 659ms
➤ YN0000: Failed with errors in 2s 999ms
ps: If you want to test all, you can run yarn make
to build exe file.
To reproduce
{
"name": "electron-quick-start",
"version": "1.0.0",
"description": "A minimal Electron application",
"main": "main.js",
"scripts": {
"start": "electron .",
"make": "electron-builder",
"postinstall": "electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps"
},
"repository": "https://github.com/electron/electron-quick-start",
"keywords": [
"Electron",
"quick",
"start",
"tutorial",
"demo"
],
"author": "GitHub",
"license": "CC0-1.0",
"devDependencies": {
"electron": "^20.1.0",
"electron-builder": "latest"
}
}
Environment
System:
OS: Windows 10 10.0.22000
CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
Binaries:
Node: 18.7.0 - C:\Users\ROADRU~1\AppData\Local\Temp\xfs-4c319603\node.CMD
Yarn: 3.2.3 - C:\Users\ROADRU~1\AppData\Local\Temp\xfs-4c319603\yarn.CMD
npm: 8.15.0 - D:\Program Files\nodejs\npm.CMD
Additional context
No response