guysoft/MagicMirrorOS

Problem with installing node gyp inside docker image.

T-REX-XP opened this issue · 3 comments

Can't install addon from https://github.com/T-REX-XP/MMM-Gestures-Modern

npm i is crashing during rebuilding node-gyp

gyp: Undefined variable module_path in binding.gyp while trying to load binding.gyp

Can you help me with finding the root cause?

Thanks

The docker images are based on node:buster-slim, so in this case python3, make and g++ are needed but not installed.

I wrote already an article in the faq how this could be solved.

Another possibility would be to additionally provide an image karsten13/magicmirror:fat based on node:buster. But the image size would be greater than 1GB (see table below) so pulling such an image would double the time for downloading.

karsten13/magicmirror   develop          f667b7d22849   28 hours ago   557MB
node                    16-buster-slim   ef157869f2fd   2 days ago     148MB
node                    16-buster        fab160ecd229   2 days ago     723MB

Fixed by adding gzip package via apt

The image karsten13/magicmirror:fat is meanwhile available (if image size doesn't matter ...).