sitincator icon indicating copy to clipboard operation
sitincator copied to clipboard

Cannot build for Raspberry Pi

Open braydend opened this issue 5 years ago • 3 comments

Hi, When I try to run scripts/pack-pi It consistently errors out at: screen shot 2018-11-30 at 1 38 13 pm

When running npm run pack:pi, however it builds successfully, but when it is loaded onto the Pi, the app launches a white screen and never changes.

The app runs successfully with the latest binary provided, just cant run any compiled myself.

Trying to compile on OSX 10.14 with node 8.12.0 and npm 6.4.1

braydend avatar Nov 30 '18 02:11 braydend

Hi there,

This is actually the exact same problem I ran into when I tried to deploy my fix for https://github.com/simplificator/sitincator/issues/12 to our pi.

Unfortunately, we can currently not allocate too much time for this project, so I would greatly appreciate any help on this. Especially on the white screen issue, as I also got that far last time I tried.

Zinggi avatar Dec 05 '18 21:12 Zinggi

@braydend & @Zinggi: Was able to get this working. Following changes fixed the problem:

  1. Upgrade node to the lastest version 11.13.0. I'm using a .node-version file with nodenv.
  2. Upgrade following packages:
"react": "^15.6.2"
"electron-packager": "^13.1.1"
"electron": "^3.1.8" // Warning: Version +4 will not work on the latest raspberry. https://github.com/electron/electron/issues/16205
"googleapis": "^14.1.0" // not really sure if this is necessary

See the whole package.json on my fork.

  1. Fix a node related issue in the storeToken function in src/gcal/index.js
// Line 71
function storeToken(token) {
  createDirectory(CREDENTIALS_DIR);

  fs.writeFile(SITINCATOR_TOKEN, JSON.stringify(token), function(err, result) {
     if(err) console.log('error', err);
  });
}

I took the codebase to create a German & Widescreen version for a client. Fork of the project can be found here.

Hope this helps with future development.

Cheers, Rodrigo

therod avatar Apr 16 '19 10:04 therod

@therod Thank you very much, this is really helpful. If I can get some time on this I'll see if I can get this fix into master

Zinggi avatar Apr 16 '19 17:04 Zinggi