WebReflection / benja

Bootable Electron Node JS Application
https://archibold.io/benja/
194 stars 32 forks source link

Doesn't booltload when modified #31

Closed utiq closed 7 years ago

utiq commented 7 years ago

I followed the steps to burn a new image and create a bootable SD and it works like a charm. I put the SD in the raspberry and it works fine. I took the SD out and I put it in my computer to modify some of the code. I just run: npm install npm start

The app worked, I didn't modify any code, but when I put back the SD in the Raspberry, it didn't boot. Just a black screen with a colorful line at the top.

Image I used: benja-rpi2.iso My OS: MacOS Sierra Raspberry: Raspberry Pi 3

WebReflection commented 7 years ago

npm install brings in modules, including those that need native platform build steps.

Those cannot possibly be compatible with the raspberry PI and you need to remove app/node_modules so that the first time the Raspberry Pi will install only production modules (and not dependencies) and it will use its own pre-built, pre-compiled version of the dependencies from the global folder.

WebReflection commented 7 years ago

TL;DR the flow in developing Benja apps locally, then put them on the Pi

Alternatively, to simplify your work flow:

Once you have this setup, you don't need to remove the node_modules folder before putting back your sd card in the Rasperrby Pi, but you might need to install globally modules that requires native scripts via ssh (or other new modules too, the production one ... where again, you just drop the node_modules folder once and that's it)