How can i understand what is the error

nikitodeon
FREE

7 months ago

One of my apps from monorepo gets error. How can i debug it? On localhost all is ok

NX Running target build for 7 projects failed Failed tasks:

Mar 25 20:32:31

- @autospace/api:build

Mar 25 20:32:31

error Command failed with exit code 1.

Mar 25 20:32:31

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Mar 25 20:32:31

error Command failed with exit code 1.

Mar 25 20:32:31

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Mar 25 20:32:32

✕ [stage-0 9/11] RUN --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-apps/web-admin/next/cache,target=/app/apps/web-admin/.next/cache --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-apps/web-manager/next/cache,target=/app/apps/web-manager/.next/cache --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-apps/web-valet/next/cache,target=/app/apps/web-valet/.next/cache --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-apps/web/next/cache,target=/app/apps/web/.next/cache --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-libs/ui/next/cache,target=/app/libs/ui/.next/cache --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-node_modules/cache,target=/app/node_modules/.cache yarn install --force --network-timeout 100000 && yarn build

process "/bin/bash -ol pipefail -c yarn install --force --network-timeout 100000 && yarn build" did not complete successfully: exit code: 1

Mar 25 20:32:32

Dockerfile:25

Mar 25 20:32:32

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

Mar 25 20:32:32

23 | # build phase

Mar 25 20:32:32

24 | COPY . /app/.

Mar 25 20:32:32

25 | >>> RUN --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-apps/web-admin/next/cache,target=/app/apps/web-admin/.next/cache --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-apps/web-manager/next/cache,target=/app/apps/web-manager/.next/cache --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-apps/web-valet/next/cache,target=/app/apps/web-valet/.next/cache --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-apps/web/next/cache,target=/app/apps/web/.next/cache --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-libs/ui/next/cache,target=/app/libs/ui/.next/cache --mount=type=cache,id=s/f5a1cd54-9b0c-47d9-a882-cda39676b707-node_modules/cache,target=/app/node_modules/.cache yarn install --force --network-timeout 100000 && yarn build

Mar 25 20:32:32

26 |

Mar 25 20:32:32

27 |

Mar 25 20:32:32

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

Mar 25 20:32:32

ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn install --force --network-timeout 100000 && yarn build" did not complete successfully: exit code: 1

Mar 25 20:32:32

Error: Docker build failed

Load More

Solved

1 Replies

chandrika
EMPLOYEE

7 months ago

Hey there, this is an application error so you'd have to look closer at the logs and search google / stack overflow for solutions.
A few tips:

  1. The error message indicates a failure with yarn install --force --network-timeout 100000 && yarn build. This suggests that the problem might be related to dependency installation or the build process itself. Review the logs closely to identify any specific errors or warnings that could give more context.

  2. Ensure that your environment setup on Railway matches your local setup. Differences in Node versions, environment variables, or other dependencies might affect the build. Try replicating the Railway environment locally to see if you can reproduce the issue.

  3. Since you're using a monorepo, make sure that your Railway configuration correctly points to the subdirectory for your app. The relevant Railway Monorepo Guide provides information on setting the root directory and other configurations.

  4. If you're using a Dockerfile, verify that it is correctly set up to handle cache mounts and other configurations needed for your build. You can check our Dockerfile Guide

  5. Sometimes, dependency conflicts can cause builds to fail. Could you please check if all dependencies are compatible and check if any recent updates might have introduced issues?

  6. Since yarn install is timing out, it could be a network-related issue. Verify that there aren't any network restrictions or proxy configurations affecting connectivity to the package registry.


Status changed to Awaiting User Response Railway 7 months ago


Railway
BOT

2 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 2 months ago