Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Service 'server' failed to build: The command '/bin/sh -c npm run build' returned a non-zero code: 1 #73

Closed
gmacario opened this issue Jul 22, 2021 · 0 comments · Fixed by #74
Labels
bug Something isn't working

Comments

@gmacario
Copy link
Collaborator

gmacario commented Jul 22, 2021

Reproduced in v0.0.1-8-g4c22b1f

NOTE: This could have been avoided if #35 were fixed

Steps to reproduce

Command

git describe --tag
docker-compose build --pull

Result

gmacario@gmpowerhorse:~/github/gmacario/blobfishes (main)$ git describe --tag
v0.0.1-8-g4c22b1f
gmacario@gmpowerhorse:~/github/gmacario/blobfishes (main)$ docker-compose build --pull
Building static-pages
Step 1/7 : FROM node:14.17.3-alpine
14.17.3-alpine: Pulling from library/node
Digest: sha256:fb6cb918cc72869bd625940f42a7d8ae035c4e786d08187b94e8b91c6a534dfd
Status: Image is up to date for node:14.17.3-alpine
 ---> f5f48375fc5d
Step 2/7 : WORKDIR /usr/src/app
 ---> Using cache
 ---> 95f2d0208e36
Step 3/7 : COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
 ---> Using cache
 ---> f45e621402f1
Step 4/7 : RUN npm install --silent
 ---> Using cache
 ---> b3bc1a7951bd
Step 5/7 : COPY . .
 ---> Using cache
 ---> 3a972fda1004
Step 6/7 : RUN npm run build
 ---> Using cache
 ---> 350016c205bb
Step 7/7 : CMD ["ls", "-laR", "build/"]
 ---> Using cache
 ---> f788ed489797
Successfully built f788ed489797
Successfully tagged blobfishes_static-pages:latest
Building server
Step 1/7 : FROM node:14.17.3-alpine
14.17.3-alpine: Pulling from library/node
Digest: sha256:fb6cb918cc72869bd625940f42a7d8ae035c4e786d08187b94e8b91c6a534dfd
Status: Image is up to date for node:14.17.3-alpine
 ---> f5f48375fc5d
Step 2/7 : WORKDIR /usr/src/app
 ---> Using cache
 ---> 95f2d0208e36
Step 3/7 : COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
 ---> Using cache
 ---> 16f61c1356bb
Step 4/7 : RUN npm install --silent
 ---> Using cache
 ---> f63aeb5748d5
Step 5/7 : COPY . .
 ---> Using cache
 ---> 9014d4c7fa99
Step 6/7 : RUN npm run build
 ---> Running in 8bb5b6ce91da
npm ERR! missing script: build

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-07-22T01_25_17_865Z-debug.log
ERROR: Service 'server' failed to build: The command '/bin/sh -c npm run build' returned a non-zero code: 1
gmacario@gmpowerhorse:~/github/gmacario/blobfishes (main)$
@gmacario gmacario added the bug Something isn't working label Jul 22, 2021
gmacario added a commit that referenced this issue Jul 22, 2021
Fix #73

Replace 'np run build' with 'rpm run build:server'

Commit e0aba58 introduced a regression
by replacing npm script "build" with "build:server".

This is quick fix to make top level Dockerfile build again.

Signed-off-by: Gianpaolo Macario <[email protected]>
gmacario added a commit that referenced this issue Jul 22, 2021
Fix #73

Replace 'npm run build' with 'rpm run build:server'

Commit e0aba58 introduced a regression
by replacing npm script "build" with "build:server".

This is quick fix to make top level Dockerfile build again.

Signed-off-by: Gianpaolo Macario <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant