Home > Blockchain >  gyp install errors with docker
gyp install errors with docker

Time:11-06

I'm trying to upgrade a project from Node 16 (16.17.1) to 18 (18.12.0). Locally everything works after I rebuild packages, but I'm getting failures in my Docker image.

Previous the image used the Node 16 buster slim image, and now I'm using the Node 18 version of the same image. Digging into the logs from failure to install two packages (sodium-native@npm:3.2.1 and libxmljs2@npm:0.29.0) I get errors because libtool is not installed and Python is not installed, respectively.

This seems strange though because comparing the two images there's nothing obvious to indicate I would see this error.

Any idea why I'm seeing these errors building the Docker image after upgrading to Node 18?

I'm using yarn to install packages rather than npm in case you think that's relevant.

CodePudding user response:

Debian 11 (bullseye) has removed the "python" package and the '/usr/bin/python' symlink due to the deprecation of Python 2.

The image has upgraded its debian base and now it doesn't have the deps you need.

In the new image it is based on FROM debian:bullseye-slim and the old one it is based on FROM debian:buster-slim.

You could install it in your dockerfile, or use a different image which has these deps.

  • Related