Error: Docker build failed
Can anyone help me with these logs? I'm trying to deploy a nodeJs application, but it's giving me an error.
#13 0.344 npm
WARN config production Use --omit=dev instead.
#13 0.395
#13 0.395 > [email protected] build
#13 0.395 > tsc
#13 0.395
#13 0.399 sh: 1: tsc: Permission denied
#13 ERROR: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 126
-----
[stage-0 8/10] RUN --mount=type=cache,id=s/9b955baa-152d-43da-8e18-573551006078-node_modules/cache,target=/app/node_modules/.cache npm run build:
WARN config production Use --omit=dev instead.
0.395
0.395 > [email protected] build
0.395 > tsc
0.395
0.399 sh: 1: tsc: Permission denied
-----
Dockerfile:24
-------------------
22 | # build phase
23 | COPY . /app/.
24 | >>> RUN --mount=type=cache,id=s/9b955baa-152d-43da-8e18-573551006078-node_modules/cache,target=/app/node_modules/.cache npm run build
25 |
26 |
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 126
Error: Docker build failed
5 Replies
Project ID:
9b955baa-152d-43da-8e18-573551006078,9b955baa-152d-43da-8e18-573551006078
what?
are you committing your node_modules and or your output build or dist folder?
it was my packjson, the typescript was a development dependency instead of being a dependency
ah gotcha