Problem deploying node.js with typescript
julibosch
HOBBYOP

a year ago

Dockerfile:24

Dec 31 14:43:18

Inmobiliaria_back

-------------------

Dec 31 14:43:18

Inmobiliaria_back

22 | # build phase

Dec 31 14:43:18

Inmobiliaria_back

23 | COPY . /app/.

Dec 31 14:43:18

Inmobiliaria_back

24 | >>> RUN --mount=type=cache,id=s/cff7e5e5-4e28-41bb-93fb-fd1d64a81f5d-node_modules/cache,target=/app/node_modules/.cache npm run build

Dec 31 14:43:18

Inmobiliaria_back

25 |

Dec 31 14:43:18

Inmobiliaria_back

26 |

Dec 31 14:43:18

Inmobiliaria_back

-------------------

Dec 31 14:43:18

Inmobiliaria_back

ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2

Dec 31 14:43:18

Inmobiliaria_back

Dec 31 14:43:18

Inmobiliaria_back

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.

Loading...