Karl-Erik Gustafsson - @Scott Bender Any idea w...
@Scott Bender Any idea why docker build from master fails to start?
11 Replies
Looks like canboatjs is failing to install for some reason…
Just tested with master, and things are fine. Not sure why it's not working in docker. @Teppo Kurki ?
Recently build docker missing canboatjs, but older has the folder (Jul-9). Cant understand.
New
Old
@signalk/streams
has canboat installed in both cases
Installing @canboat/canboatjs
in /usr/lib/node_modules/signalk-server/
add it and then SK can be started.
Can see anything that have changed?!?
Have these sub-folders had own node_modules folders earlier? Now there are at least two locations where e.g. canboatjs
and ts-pgns
are installed. Haven't check if there other multiple installation for other packages too.I don't understand why this only happens in docker...
or maybe we just need a new docker build
there's a build happening now
I am going to release a new beta noew also...
docker build off master does a bit of black magic, shuffling dependencies, so this may be fallout from that
i am a bit bandwidth limited at the moment, but this may be related to the fact that n2k-signalk used to depend on canboatjs, but no longer does
in my local workspace:
so while canboatjs is being pulled in my streams it is installed under workspace root's node_modules, where the server code can find it
npm pack & install from the tar file also places canboatjs at ./node_modules/@canboat/canboatjs

tried adding an ESLint rule for catching implicit deps https://github.com/SignalK/signalk-server/pull/2049 (no fixes yet, just the eslint rule)
i think if server depends on @canboat/canboatjs we should add it as a dependency, i believe that should take care of this particular quirk
GitHub
chore: add eslint rule for implicit dependencies by tkurki · Pull ...
npm hoists transitive dependencies to the top level node_modules, from where they are easy to inadvertedly use. Also we may accidentally remove dependencies that are actually used via this implicit...
GitHub
chore: add eslint rule for implicit dependencies · SignalK/signalk...
An implementation of a Signal K central server for boats. - chore: add eslint rule for implicit dependencies · SignalK/signalk-server@fb90ce7
demo.signalk.org is now running 2.15.0-beta.6 so clearly the problem is related to master vs release build differences
It seems that SK master docker build is working fine. Also tested that beta.6 and did not see any issues. With my own docker build development environment, where I clone Signal K repo and do same build steps + tagging stuff, it fails with
@canboat(canboatjs
missing. Tagging step just rip needed info from cloned SK repo to get same tags to build.
I added npm i --save @canboat/canboatjs
before building modules, here https://github.com/SignalK/signalk-server/blob/master/.github/workflows/build-docker.yml#L27 and then all fine again.
Timing when issue appeared and this change is a match.
https://github.com/SignalK/n2k-signalk/commit/858dda02c94c8672442a2cb8b85a41774666057c
As the server seems to need @canboat/canboatjs
, then can it be added?Oh! Shoot!
Well I screwed that up.
I should not have removed that dependency. Will add back and do a release…
ok, that's done. n2k-signalk 4.2.3 published
And all fine again 👍