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

"platform" and "arch" options have no effect #316

Open
faribauc opened this issue Dec 11, 2024 · 0 comments
Open

"platform" and "arch" options have no effect #316

faribauc opened this issue Dec 11, 2024 · 0 comments

Comments

@faribauc
Copy link

Describe the bug
When specified on the command line, the platform and arch parameters are not passed to the Electron builder options.

To Reproduce
Steps to reproduce the behavior:

  1. npx create-nx-workspace@latest acme --preset=apps --packageManager=yarn
  2. cd acme
  3. nx add @nx/react
  4. nx g @nx/react:application apps/my-app --unitTestRunner=jest
  5. yarn add nx-electron
  6. nx g nx-electron:app electron --frontendProject=my-app
  7. yarn add rxjs webpack-node-externals
  8. nx run electron:package --platform=windows

Expected behavior
Platform option should be passed to electron builder

Screenshots

$ nx run electron:package --platform=windows --arch=ia32

> nx run electron:package --platform=windows --arch=ia32

*********************************************************
DO NOT FORGET TO REBUILD YOUR FRONTEND & BACKEND PROJECTS
FOR PRODUCTION BEFORE PACKAGING / MAKING YOUR ARTIFACT!
*********************************************************
  • electron-builder  version=25.1.8 os=6.8.0-49-generic
  • writing effective config  file=dist/packages/builder-effective-config.yaml
  • executing @electron/rebuild  electronVersion=31.7.6 arch=x64 buildFromSource=false appDir=./
  • installing native dependencies  arch=x64
  • completed installing native dependencies
  • packaging       platform=linux arch=x64 electron=31.7.6 appOutDir=dist/packages/linux-unpacked

—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 NX   Successfully ran target package for project electron (4s)

      With additional flags:
        --platform=windows
        --arch=ia32

Running the electron-builder CLI manually works as expected:

$ electron-builder --win --ia32
  • electron-builder  version=25.1.8 os=6.8.0-49-generic
  • writing effective config  file=dist/builder-effective-config.yaml
  • executing @electron/rebuild  electronVersion=31.7.6 arch=ia32 buildFromSource=false appDir=./
  • installing native dependencies  arch=ia32
  • completed installing native dependencies
  • packaging       platform=win32 arch=ia32 electron=31.7.6 appOutDir=dist/win-ia32-unpacked

Desktop (please complete the following information):

  • OS: Linux
  • Nx Electron Version: 20.0.0-alpha.0
  • Node.js Version: 22.10.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant