Error while building openmrs-distro-referenceapplication

Running this command while building the openmrs-distro-referenceapplication **docker compose build** leads to the error below.

=> ERROR [frontend dev 6/8] RUN npx --legacy-peer-deps openmrs@next assemble --m 256.5s

failed to solve: process “/bin/sh -c npx --legacy-peer-deps openmrs@${APP_SHELL_VERSION:-n ext} assemble --manifest --mode config --config spa-assemble-config.json --target ./spa” d id not complete successfully: exit code: 1

I have just successfully run the same command. What versions of node and npm do you have?

I have tried with node v22.13.1 and npm 11.1.0 also tried with v18.20.6 (npm v10.8.2) still got the same error.

Docker version 27.5.1, build 9f9e405 and Docker Compose version v2.32.4

OS

NAME=“Ubuntu” VERSION_ID=“24.04” VERSION=“24.04.1 LTS (Noble Numbat)”