Skip to content

"npm install electron-builder" fails on Armbian Linux (arm7l) #9612

@rppoor

Description

@rppoor

(Edit: after looking through open issues, I see that this is similar to issue #9213.)

Trying to install an app package on Armbian Linux fails and it appears that electron-winstaller is trying to be installed as if this is a WIndows platform. (Edit: After a little research, it appears that 'electron-winstaller' is for Windows (or WSL) only. Why is it part of this package?)

My system: odroid-xu4, Armbian 26.2.1 noble (based on Ubuntu 24.04 LTS), kernel 6.6.122 (arm7l), Node.js v18.19.1, NPM 9.2.0.

(N.B. I upgraded Node.js to version 22.22.0 using NVM and the results are the same.)

$ npm install --platform=linux --arch=arm7l electron-builder@latest

resulting log file (clipped):

....
1157 silly audit bulk request {
1157 silly audit 'electron-builder-squirrel-windows': [ '26.8.1' ],
...
1691 info run [email protected] install node_modules/electron-winstaller node ./script/select-7z-arch.js
1692 info run [email protected] install { code: 1, signal: null }
1693 timing reify:rollback:createSparse Completed in 954ms
1694 timing reify:rollback:retireShallow Completed in 0ms
1695 timing command:install Completed in 33191ms
1696 verbose stack Error: command failed
1696 verbose stack at ChildProcess. (/usr/share/nodejs/@npmcli/promise-spawn/lib/index.js:53:27)
1696 verbose stack at ChildProcess.emit (node:events:517:28)
1696 verbose stack at maybeClose (node:internal/child_process:1098:16)
1696 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:303:5)
1697 verbose pkgid [email protected]
1698 verbose cwd /root
1699 verbose Linux 6.6.122-current-odroidxu4
1700 verbose node v18.19.1
1701 verbose npm v9.2.0
1702 error code 1
1703 error path /root/node_modules/electron-winstaller
1704 error command failed
1705 error command sh -c node ./script/select-7z-arch.js
1706 error Selecting 7-Zip for arch arm
1707 error /root/node_modules/electron-winstaller/script/select-7z-arch.js:16
1707 error throw err;
1707 error ^
1707 error
1707 error Error: ENOENT: no such file or directory, copyfile 'vendor/7z-arm.exe' -> 'vendor/7z.exe'
1707 error at Object.copyFileSync (node:fs:2982:3)
1707 error at Object. (/root/node_modules/electron-winstaller/script/select-7z-arch.js:14:8)
1707 error at Module._compile (node:internal/modules/cjs/loader:1356:14)
1707 error at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
1707 error at Module.load (node:internal/modules/cjs/loader:1197:32)
1707 error at Module._load (node:internal/modules/cjs/loader:1013:12)
1707 error at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
1707 error at node:internal/main/run_main_module:28:49 {
1707 error errno: -2,
1707 error syscall: 'copyfile',
1707 error code: 'ENOENT',
1707 error path: 'vendor/7z-arm.exe',
1707 error dest: 'vendor/7z.exe'
1707 error }
1707 error
1707 error Node.js v18.19.1
1708 verbose exit 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions