最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Electron not working on Raspberry Pi - Stack Overflow

programmeradmin4浏览0评论

At the moment, I am developing a "kiosk" application for my Raspberry Pi. I decided to use Electron as it offers the key feature I need: Combining a web based UI with direct system an I/O access via node.js.

However, Electron refuses to run on my Raspberry Pi whereas it works just fine on the puter I am using for development. Nothing happens after issuing electron . in the terminal, the program just exits without showing a window or any errors in the mand line. Any clues? I couldn't find any on the web so far. I installed Electron via npm install electron-prebuilt -g, which downloaded and installed the latest ARM-version.

If this is an unresolvable patibility problem: Are there any good alternatives for Electron?

Thanks in advance!

At the moment, I am developing a "kiosk" application for my Raspberry Pi. I decided to use Electron as it offers the key feature I need: Combining a web based UI with direct system an I/O access via node.js.

However, Electron refuses to run on my Raspberry Pi whereas it works just fine on the puter I am using for development. Nothing happens after issuing electron . in the terminal, the program just exits without showing a window or any errors in the mand line. Any clues? I couldn't find any on the web so far. I installed Electron via npm install electron-prebuilt -g, which downloaded and installed the latest ARM-version.

If this is an unresolvable patibility problem: Are there any good alternatives for Electron?

Thanks in advance!

Share Improve this question asked Aug 10, 2015 at 19:14 stoeffnstoeffn 5563 gold badges9 silver badges18 bronze badges 6
  • I have the exact same issue. Did you manage to find a solution for this by now? – Julian Hollmann Commented Aug 17, 2015 at 13:30
  • Unfortunately, I couldn't find a solutution yet - I'm still working on it – stoeffn Commented Aug 17, 2015 at 13:40
  • Can you elaborate a bit on your setup? Which distribution to you use? How did you install nodejs? Which version of nodejs have you installed? – Julian Hollmann Commented Aug 17, 2015 at 13:44
  • I use the Raspbian distribution as it was installed already for previous projects. Then I installed electron via the node package manager which I did successfully on my working machine as well. Nevertheless, (for private reasons) I won't be able to investigate this issue any further during the next two or three weeks. A recent suspicions is that there is just not enough RAM in order to execute Electron. – stoeffn Commented Aug 17, 2015 at 20:16
  • 2 I tried it at home today with a newer raspbian version and a 16GB SD Card. The examples taken from github./hokein/electron-sample-apps now work for me. So it's either free space or the newer raspbian version. – Julian Hollmann Commented Aug 18, 2015 at 13:49
 |  Show 1 more ment

4 Answers 4

Reset to default 6

Unfortunately the reason for that error is that Electron currently does not support ARM devices. We will have to wait until it is implemented

See this issue https://github./atom/electron/issues/1702

-- Update

As noted by @skeggse, Electron now does support ARM.

  • 1 Get the dependecies going apt-get install libgtk2.0-0 libnotify4 libgconf2-4 libnss3 node npm

  • 2 Download the latest arm release called electron-...-linux-arm.zip from here

  • 3 unzip electron-...-linux-arm.zip

  • 4 go inside the folder and double click the file named electron

  • 5 Have fun!

Depending on which Raspberry Pi you have it may be an inpatible binary. The electron prebuilt binaries, I believe, target armv7-hf. Try building electron from source. The instructions can be found here https://github./atom/electron/blob/master/docs/development/build-instructions-linux.md

Note that if you are interested in using hardware float support (at least prior to RPiB+) you might want to run Raspbian or another port with hard-float support. (ref)

Connect to Raspberry SSH as user pi, and execute this:

# Clone this repository
git clone https://github./electron/electron-quick-start
# Go into the repository
cd electron-quick-start
# Install dependencies
npm install
# Set display
export DISPLAY=:0
# Run the app
npm start

This is a pretty broad question. You could try stopping on the first line of your application with:

electron --debug-brk=5858 .

This would help you determine whether it's an electron issue or an issue with your app.

http://electron.atom.io/docs/v0.30.0/tutorial/debugging-main-process/

发布评论

评论列表(0)

  1. 暂无评论