Open lazyprogrammerio opened 2 months ago
Hi,
What is the equivalent command to the
npm install electron
You can continue to use npm install electron
because the javascript part is cross-platform.
using the published release .zip
The way to use the published release .zip is largely dependent on how you build your application.
electron/get
for example, https://github.com/electron/get?tab=readme-ov-file#specifying-a-mirror)electron/packager
and electron-builder) doesn't recognize the riscv64 architecture. So a patch is needed: (for electron/packager: https://github.com/felixonmars/archriscv-packages/blob/master/zettlr/electron-packager-riscv64.patch)When I run npm install electron
, it fails at this moment here: https://github.com/electron/electron/blob/main/npm/install.js#L49
Only if I run ELECTRON_SKIP_BINARY_DOWNLOAD npm install electron
, the npm install works.
When I run
npm install electron
, it fails at this moment here: https://github.com/electron/electron/blob/main/npm/install.js#L49
Yes, that error is expected if you are building on a riscv64 host. You already mentioned the solution:
Only if I run
ELECTRON_SKIP_BINARY_DOWNLOAD npm install electron
, the npm install works.
Usually you will need to apply more workarounds like this to get it work, like https://github.com/felixonmars/archriscv-packages/blob/45fbfb5d7b8fc22ebaee52a6ed839dc7cbb18fc5/element.io/riscv64.patch#L7-L9
Because native riscv64 CI environment is rare, usually maintainers of electron applications prefer to build on x64 host for x64, arm64, riscv64 and other targets.
Hello. What is the equivalent command to the
npm install electron
when using the published release .zip?Thank you!