Skip to content

Docker image build step failing in CI due to node version incompatibility #2022

@dcroote

Description

@dcroote

The docker image build step in CI has been failing e.g. since c43d981 due to a node version incompatibility with a package:

#5 22.58 error minimatch@10.0.1: The engine "node" is incompatible with this module. Expected version "20 || >=22". Got "18.19.1"
#5 22.59 error Found incompatible module.

At the time, my quick Discord suggestion, which worked but was a hack, was below. The actual solution to this is to get Airnode working with Node.js 20, though that hasn't been straightforward (#1920)



Now yarn provides a way to ignore engines: --ignore-engines
To enable this for the Docker files being built, go into each of the following 3 Docker files:

./packages/airnode-node/docker/Dockerfile
./packages/airnode-deployer/docker/Dockerfile
./packages/airnode-admin/docker/Dockerfile

and add --ignore-engines to the end of the line in each starting with yarn global add (but add it before the && \ of course)

Then, run yarn docker:build:latest (this, importantly, rebuilds the packaging container first, which is necessary).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions