Problem deploying node.js with typescript
julibosch
HOBBYOP
a year ago
Dockerfile:24
-------------------
22 | # build phase
23 | COPY . /app/.
24 | >>> RUN --mount=type=cache,id=s/cff7e5e5-4e28-41bb-93fb-fd1d64a81f5d-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: 2
Error: Docker build failed
1 Replies
a year ago
Where you able to check your build logs for errors? I see this error in your build logs -
error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./weeksToDays.js")' call instead.