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

Prebuilt win32 npm package @parcel/watcher-win32-ia32 not working with electron-builder #181

Open
jmeinke opened this issue Jun 27, 2024 · 1 comment

Comments

@jmeinke
Copy link

jmeinke commented Jun 27, 2024

We are currently using the 32-bit version of Electron for our desktop app, and as a result, we need a build of @parcel/watcher for the win32 architecture. Unfortunately, this build is not available:
Uncaught (in promise) Error: Could not dynamically require "@parcel/watcher-win32-ia32".

Our customers have hardcoded the path to the 32-bit installation directory and executable of our desktop application in their third-party applications' configurations. Updating these configurations would require them to uninstall the 32-bit app, reinstall the 64-bit app, and update all of their third-party app configurations accordingly. This is particularly challenging as they often need to update multiple clients (ranging from 4 to 60).

To address this, we plan to modify our desktop app installer to provide both the 32-bit and 64-bit versions of Electron and the necessary native binaries. We will encourage our customers to transition to the 64-bit version as soon as possible, but we recognize that this process will take some time.

In the meantime, it would be extremely helpful if you could provide a prebuilt binary for win32.

@jmeinke jmeinke changed the title Could you please provide a prebuilt binary for win32? Could you please provide a prebuilt binary for win32 as an npm package @parcel/watcher-win32-ia32? Jun 27, 2024
@jmeinke
Copy link
Author

jmeinke commented Jun 27, 2024

I've seen that there actually is a prebuilt package: https://www.npmjs.com/package/@parcel/watcher-win32-ia32
However, electron-builder does not seem to install it during the win32 build - in our case it looks like this:

npm run dist:win-development

> [email protected] dist:win-development
> electron-builder --win --config config/development.js

  • electron-builder  version=24.9.4 os=10.0.22631
  • loaded configuration  file=D:\Projects\abc-desktop-app\config\development.js
  • writing effective config  file=dist\builder-effective-config.yaml
  • rebuilding native dependencies  [email protected], [email protected] platform=win32 arch=ia32
  • install prebuilt binary  name=keytar version=7.9.0 platform=win32 arch=ia32 napi=
  • install prebuilt binary  name=win-verify-signature version=1.7.0 platform=win32 arch=ia32 napi=
• packaging       platform=win32 arch=ia32 electron=30.1.2 appOutDir=dist\win-ia32-unpacked
  • building        target=nsis file=dist\abc-Installer-5.8.1-dev.4.exe archs=ia32 oneClick=false perMachine=false
  • building block map  blockMapFile=dist\abc-Installer-5.8.1-dev.4.exe.blockmap

When looking into the dist\win-ia32-unpacked directory, I see the wrong arch version of @parcel/watcher watcher-win32-x64 there.

If I try to install it manually via npm install @parcel/watcher-win32-ia32 for a local build on my machine, I get the following errors:

npm error code EBADPLATFORM
npm error notsup Unsupported platform for @parcel/[email protected]: wanted {"os":"win32","cpu":"ia32"} (current: {"os":"win32","cpu":"x64"})
npm error notsup Valid os:   win32
npm error notsup Actual os:  win32
npm error notsup Valid cpu:  ia32
npm error notsup Actual cpu: x64

We should be able to generate a win32 app build even on a host that uses an actual x64 cpu.

An ugly workaround is to issue the following command in CI before building the installer using electron-installer:
npm install @parcel/watcher-win32-ia32 --force

@jmeinke jmeinke changed the title Could you please provide a prebuilt binary for win32 as an npm package @parcel/watcher-win32-ia32? Prebuilt binary for win32 as npm package @parcel/watcher-win32-ia32 does not work with electron-builder Jun 27, 2024
@jmeinke jmeinke changed the title Prebuilt binary for win32 as npm package @parcel/watcher-win32-ia32 does not work with electron-builder Prebuilt win32 npm package @parcel/watcher-win32-ia32 not working with electron-builder Jun 27, 2024
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