Cannot build Electron.net on Raspberry Pi 4 #651

Closed
opened 2026-01-29 16:45:10 +00:00 by claunia · 1 comment
Owner

Originally created by @redplane on GitHub (Apr 12, 2021).

  • Electron.NET: 11.5.1.0
  • Electron API: 11.5.1
  • Net 5
  • Node 15.12.0
  • Target: linux-arm

Steps to Reproduce:

  1. Check out code on Raspberry Pi 4
  2. Run command: electronize build /target linux-arm /PublishReadyToRun false
  3. Build error appeared:
 ⨯ chmod /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons/electron-linux/256x256.png: operation not permitted
github.com/develar/app-builder/pkg/icons.doConvertIcon
	/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:208
github.com/develar/app-builder/pkg/icons.ConvertIcon
	/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:66
github.com/develar/app-builder/pkg/icons.ConfigureCommand.func1
	/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:33
github.com/alecthomas/kingpin.(*actionMixin).applyActions
	/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/actions.go:28
github.com/alecthomas/kingpin.(*Application).applyActions
	/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:557
github.com/alecthomas/kingpin.(*Application).execute
	/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:390
github.com/alecthomas/kingpin.(*Application).Parse
	/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:222
main.main
	/Volumes/data/Documents/app-builder/main.go:90
runtime.main
	/usr/local/Cellar/go/1.15.5/libexec/src/runtime/proc.go:204
runtime.goexit
	/usr/local/Cellar/go/1.15.5/libexec/src/runtime/asm_arm.s:857  
  ⨯ Cannot cleanup: 
Error #1 --------------------------------------------------------------------------------
Error: /usr/lib/node_modules/electron-builder/node_modules/app-builder-bin/linux/arm/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
    at ChildProcess.<anonymous> (/usr/lib/node_modules/electron-builder/node_modules/builder-util/src/util.ts:243:14)
    at Object.onceWrapper (node:events:476:26)
    at ChildProcess.emit (node:events:369:20)
    at maybeClose (node:internal/child_process:1067:16)
    at Socket.<anonymous> (node:internal/child_process:453:11)
    at Socket.emit (node:events:369:20)
    at Pipe.<anonymous> (node:net:665:12)
Error #2 --------------------------------------------------------------------------------
Error: /usr/lib/node_modules/electron-builder/node_modules/app-builder-bin/linux/arm/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
    at ChildProcess.<anonymous> (/usr/lib/node_modules/electron-builder/node_modules/builder-util/src/util.ts:243:14)
    at Object.onceWrapper (node:events:476:26)
    at ChildProcess.emit (node:events:369:20)
    at maybeClose (node:internal/child_process:1067:16)
    at Socket.<anonymous> (node:internal/child_process:453:11)
    at Socket.emit (node:events:369:20)
    at Pipe.<anonymous> (node:net:665:12)  stackTrace=

Originally created by @redplane on GitHub (Apr 12, 2021). <!-- Which version of Electron.NET CLI and API are you using? --> - **Electron.NET**: `11.5.1.0` - **Electron API**: `11.5.1` <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> - Net 5 - Node 15.12.0 <!-- What target are you building for? --> * **Target**: linux-arm <!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) --> Steps to Reproduce: 1. Check out code on Raspberry Pi 4 2. Run command: `electronize build /target linux-arm /PublishReadyToRun false` 3. Build error appeared: ``` ⨯ chmod /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons/electron-linux/256x256.png: operation not permitted github.com/develar/app-builder/pkg/icons.doConvertIcon /Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:208 github.com/develar/app-builder/pkg/icons.ConvertIcon /Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:66 github.com/develar/app-builder/pkg/icons.ConfigureCommand.func1 /Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:33 github.com/alecthomas/kingpin.(*actionMixin).applyActions /Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/actions.go:28 github.com/alecthomas/kingpin.(*Application).applyActions /Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:557 github.com/alecthomas/kingpin.(*Application).execute /Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:390 github.com/alecthomas/kingpin.(*Application).Parse /Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:222 main.main /Volumes/data/Documents/app-builder/main.go:90 runtime.main /usr/local/Cellar/go/1.15.5/libexec/src/runtime/proc.go:204 runtime.goexit /usr/local/Cellar/go/1.15.5/libexec/src/runtime/asm_arm.s:857 ⨯ Cannot cleanup: Error #1 -------------------------------------------------------------------------------- Error: /usr/lib/node_modules/electron-builder/node_modules/app-builder-bin/linux/arm/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE at ChildProcess.<anonymous> (/usr/lib/node_modules/electron-builder/node_modules/builder-util/src/util.ts:243:14) at Object.onceWrapper (node:events:476:26) at ChildProcess.emit (node:events:369:20) at maybeClose (node:internal/child_process:1067:16) at Socket.<anonymous> (node:internal/child_process:453:11) at Socket.emit (node:events:369:20) at Pipe.<anonymous> (node:net:665:12) Error #2 -------------------------------------------------------------------------------- Error: /usr/lib/node_modules/electron-builder/node_modules/app-builder-bin/linux/arm/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE at ChildProcess.<anonymous> (/usr/lib/node_modules/electron-builder/node_modules/builder-util/src/util.ts:243:14) at Object.onceWrapper (node:events:476:26) at ChildProcess.emit (node:events:369:20) at maybeClose (node:internal/child_process:1067:16) at Socket.<anonymous> (node:internal/child_process:453:11) at Socket.emit (node:events:369:20) at Pipe.<anonymous> (node:net:665:12) stackTrace= ```
claunia added the bug label 2026-01-29 16:45:10 +00:00
Author
Owner

@redplane commented on GitHub (Apr 13, 2021):

Seems to be it is about the access permission for folder /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons

Suddenly, I have found this Github repository, in which they mentioned:

Note: Building on Linux may give some errors. Provided are some common errors and resolutions. After attempting each resolution, try the build again:

Error: ‘electron-builder update check failed’ Resolution: follow the instructions to ‘get access to the local update config store’
Error (if the exact path to directory /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons differs in the error message, change it in the resolution command as well):
⨯ chmod /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons/electron-linux/256x256.png: operation not permitted
​ Resolution:

sudo find /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons -type d -user root -exec sudo chown -R $USER: {} +

I tried their command sudo find /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons -type d -user root -exec sudo chown -R $USER: {} + and build the application. It worked :)

@redplane commented on GitHub (Apr 13, 2021): Seems to be it is about the access permission for folder `/usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons` Suddenly, I have found this [Github repository](https://github.com/CDA6122/Project), in which they mentioned: >>Note: Building on Linux may give some errors. Provided are some common errors and resolutions. After attempting each resolution, try the build again: >>Error: ‘electron-builder update check failed’ Resolution: follow the instructions to ‘get access to the local update config store’ >>Error (if the exact path to directory /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons differs in the error message, change it in the resolution command as well): ⨯ chmod /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons/electron-linux/256x256.png: operation not permitted ​ Resolution: >>sudo find /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons -type d -user root -exec sudo chown -R $USER: {} + I tried their command `sudo find /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons -type d -user root -exec sudo chown -R $USER: {} +` and build the application. It worked :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#651