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

Quasar Electron can't build with Electron Builder versions 24.13.1 and higher (the default that Quasar pulls) using pnpm #17153

Open
marty0678 opened this issue Apr 30, 2024 · 1 comment
Labels
area/cli bug/1-hard-to-reproduce A reproduction is available, but it's hard to reproduce, so it has a lower priority. bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 mode/electron Qv2 🔝 Quasar v2 issues

Comments

@marty0678
Copy link

marty0678 commented Apr 30, 2024

What happened?

Setting up a brand new Quasar project following the instructions in the docs, will not allow Quasar to build an Electron app using builder. I've traced this issue to the 24.13.1 release of Electron Builder, 24.13.0 works correctly.

Only appears to affect pnpm - can not reproduce with yarn.

Release - https://github.com/electron-userland/electron-builder/releases/tag/v24.13.1
Suspect PR - electron-userland/electron-builder#8052

What did you expect to happen?

To be able to install a fresh Quasar project with pnpm, switch to electron builder mode, and build the stock app.

Reproduction URL

https://github.com/marty0678/quasar-electron-builder-repro

How to reproduce?

Either reference the included repo and:

  1. Clone repo
  2. pnpm install
  3. quasar build -m electron

Or just follow the steps below:

  1. In a fresh repo/folder, run pnpm create quasar
  2. Follow all steps using defaults
  3. Navigate into the folder and pnpm install if you didn't already
  4. In quasar.config.js change the electron -> bundler from packager to builder
  5. Run quasar dev -m electron to verify
  6. Run quasar build -m electron to build

During the building stage of the package, you will get (shortened for brevity):

Error: C:\Users\{{user}}\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1
Output:
Command line defined: "APP_ID=quasar-project"
Command line defined: "APP_GUID={{guid}}"
Command line defined: "UNINSTALL_APP_KEY={{app_key}}"
Command line defined: "PRODUCT_NAME=Quasar App"
Command line defined: "PRODUCT_FILENAME=Quasar App"
Command line defined: "APP_FILENAME=quasar-project"
Command line defined: "APP_DESCRIPTION=A Quasar Project"
Command line defined: "VERSION=0.0.1"
Command line defined: "PROJECT_DIR=C:\Users\{{user}}\Git\{{user}}\quasar-electron-builder-repro"
Command line defined: "BUILD_RESOURCES_DIR=C:\Users\{{user}}\Git\{{user}}\quasar-electron-builder-repro\src-electron"
Command line defined: "APP_PACKAGE_NAME=quasar-project"
Command line defined: "MUI_ICON=C:\Users\{{user}}\Git\{{user}}\quasar-electron-builder-repro\src-electron\icons\icon.ico"
Command line defined: "MUI_UNICON=C:\Users\{{user}}\Git\{{user}}\quasar-electron-builder-repro\src-electron\icons\icon.ico"
Command line defined: "APP_64=C:\Users\{{user}}\Git\{{user}}\quasar-electron-builder-repro\dist\electron\Packaged\quasar-project-0.0.1-x64.nsis.7z"
Command line defined: "APP_64_NAME=quasar-project-0.0.1-x64.nsis.7z"
Command line defined: "APP_64_HASH={{hash}}"
Command line defined: "APP_64_UNPACKED_SIZE=287351"
Command line defined: "COMPANY_NAME={{name}}"
Command line defined: "APP_PRODUCT_FILENAME=Quasar App"
Command line defined: "APP_INSTALLER_STORE_FILE=quasar-project-updater\installer.exe"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "ONE_CLICK"
Command line defined: "RUN_AFTER_FINISH"
Command line defined: "SHORTCUT_NAME=Quasar App"
Command line defined: "UNINSTALL_DISPLAY_NAME=Quasar App 0.0.1"
Command line defined: "ESTIMATED_SIZE=287351"
Command line defined: "COMPRESS=auto"
Command line defined: "BUILD_UNINSTALLER"
Command line defined: "UNINSTALLER_OUT_FILE=C:\Users\{{user}}\Git\{{user}}\quasar-electron-builder-repro\dist\electron\Packaged\__uninstaller-nsis-quasar-project.exe"
Processing config: C:\Users\{{user}}\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\nsisconf.nsh
Processing script file: "<stdin>" (UTF8)

Error output:
!include: could not open file: "C:\Users\{{user}}\Git\{{user}}\quasar-electron-builder-repro\node_modules\.pnpm\app-builder-lib@24.13.3_dmg-builder@24.13.3_electron-builder-squirrel-windows@24.13.3_dmg-bui_lrspnoputfiosacwyigcypdbdi\node_modules\app-builder-lib\templates\nsis\include\StdUtils.nsh"
Error in script "<stdin>" on line 1 -- aborting creation process


UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite), Electron Mode

Platforms/Browsers

Electron

Quasar info output

Operating System - Windows_NT(10.0.22631) - win32/x64
NodeJs - 20.10.0

Global packages
  NPM - 10.2.3
  yarn - 1.22.21
  @quasar/cli - 2.4.1
  @quasar/icongenie - 3.1.1
  cordova - Not installed

Important local packages
  quasar - 2.15.4 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 1.8.5 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.11 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.4.26 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.3.2
  pinia - Not installed
  vuex - Not installed
  vite - 2.9.18 -- Native-ESM powered web dev build tool
  eslint - 8.57.0 -- An AST-based pattern checker for JavaScript.
  electron - 30.0.1 -- Build cross platform desktop apps with JavaScript, HTML, and CSS
  electron-packager - Not installed
  @electron/packager - Not installed
  electron-builder - 24.13.3 -- A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with ???auto update??? support out of the box
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Networking
  Host - {{host}}
  Ethernet 3 - 192.168.86.105
  Wi-Fi - 192.168.86.31
  vEthernet (WSL (Hyper-V firewall)) - 172.31.208.1

Relevant log output

No response

Additional context

I don't believe this is a Quasar issue specifically, rather just needing to update the 'out of the box' experience to support Electron Builder's changes.

Note that reverting to electron-builder@24.13.0 fixes this or using yarn/npm also fixes this.

pnpm version - 9.0.6

@marty0678 marty0678 added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Apr 30, 2024
@github-actions github-actions bot added area/cli bug/1-hard-to-reproduce A reproduction is available, but it's hard to reproduce, so it has a lower priority. bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite mode/electron labels Apr 30, 2024
@marty0678
Copy link
Author

Looks like an issue has been opened with Electron Builder - electron-userland/electron-builder#8175 and they have reported the same thing I have found, with pinning 24.13.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli bug/1-hard-to-reproduce A reproduction is available, but it's hard to reproduce, so it has a lower priority. bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 mode/electron Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

1 participant