codeforequity-at / botium-speech-processing

Botium Speech Processing
https://www.botium.at
MIT License
945 stars 58 forks source link

ERROR: Service 'frontend' failed to build: The command '/bin/sh -c npm install --no-optional --production' returned a non-zero code: 127 #9

Closed shriramhr closed 4 years ago

shriramhr commented 4 years ago

Hi, I'm getting this error. Any idea how I could solve this?

codeforequity-at commented 4 years ago

Seems like a firewall or proxy error. can you post the output from the docker-compose command ?

shriramhr commented 4 years ago

Seems like a firewall or proxy error. can you post the output from the docker-compose command ?

I'll do that soon. Is there a way to add netwok host like in the docker run parameter "--network host" inside the docker compose config file?

shriramhr commented 4 years ago

Seems like a firewall or proxy error. can you post the output from the docker-compose command ?

This is the full output:

Setting up libsox-fmt-mp3:amd64 (14.4.2-3ubuntu0.18.04.1) ... Setting up libsox-fmt-alsa:amd64 (14.4.2-3ubuntu0.18.04.1) ... Setting up libsndfile1:amd64 (1.0.28-4ubuntu0.18.04.1) ... Setting up libsox-fmt-base:amd64 (14.4.2-3ubuntu0.18.04.1) ... Setting up sox (14.4.2-3ubuntu0.18.04.1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Removing intermediate container 389a507d4ef2 ---> e374a2255283 Step 4/10 : WORKDIR /app ---> Running in 9e9423f99db9 Removing intermediate container 9e9423f99db9 ---> b1b33101dbfc Step 5/10 : COPY . /app ---> bd63e00e0289 Step 6/10 : RUN find . -type f -print0 | xargs -0 dos2unix ---> Running in 702507e9b905 dos2unix: converting file ./.gitignore to Unix format... dos2unix: converting file ./.eslintrc.js to Unix format... dos2unix: converting file ./package.json to Unix format... dos2unix: converting file ./Dockerfile to Unix format... dos2unix: converting file ./resources/.env to Unix format... dos2unix: converting file ./src/stt/google.js to Unix format... dos2unix: converting file ./src/stt/kaldi.js to Unix format... dos2unix: converting file ./src/convert/sox.js to Unix format... dos2unix: converting file ./src/routes.js to Unix format... dos2unix: converting file ./src/swagger.json to Unix format... dos2unix: converting file ./src/swaggerDef.json to Unix format... dos2unix: converting file ./src/server.js to Unix format... dos2unix: converting file ./src/utils.js to Unix format... dos2unix: converting file ./src/tts/picotts.js to Unix format... dos2unix: converting file ./src/tts/marytts.js to Unix format... dos2unix: converting file ./.dockerignore to Unix format... dos2unix: converting file ./.eslintignore to Unix format... Removing intermediate container 702507e9b905 ---> 756068189299 Step 7/10 : RUN npm install --no-optional --production ---> Running in e4391affeccc /bin/sh: 1: npm: not found ERROR: Service 'frontend' failed to build: The command '/bin/sh -c npm install --no-optional --production' returned a non-zero code: 127

codeforequity-at commented 4 years ago

it seems as if there goes something wrong with the node.js installation in the build step before the log output start. can you please post the full output here from the very beginning please.

shriramhr commented 4 years ago

it seems as if there goes something wrong with the node.js installation in the build step before the log output start. can you please post the full output here from the very beginning please.

Hi, I solved it by adding this to the frontend dockerfile: RUN apt-get update && apt-get upgrade -y && \ apt-get install -y nodejs \ npm