tkurki / marinepi-provisioning

Ansible provisioning scripts to set up a Raspberry Pi for marine use
Apache License 2.0
45 stars 21 forks source link

Signal K from git now needs a build step #77

Closed bergie closed 3 years ago

bergie commented 4 years ago

We need to add a npm run build in the git checkout for the signalk role. Otherwise it'll fail to start with:

$ /usr/bin/node /opt/signalk-server/bin/signalk-server
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '../lib'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
tkurki commented 4 years ago

Is installing from git really necessary? My plan for the coming season is to run in Docker (like I did last season) or the standard way is to install from npm.

bergie commented 4 years ago

Well, the node-app setup for the signalk role uses git. I definitely see the appeal of going Docker (though preferably with containers run individually by systemd instead of docker-compose), but right now this seems to be the default installation method, and it broke when Signal K went TypeScript.

tkurki commented 4 years ago

Just in case you’ve missed it: https://github.com/tkurki/marinepi-provisioning/tree/master/roles/signalk-docker

bergie commented 4 years ago

Yup, I've seen that one. Comes with a bit more stuff than what I need so I've been sticking to the regular SK role