Building Image issue with Node.js
el7alafawy
TRIALOP

2 years ago

Hello,

My Node.js typescript server is building and starting perfectly on my local machine but whenever I use railway it shows image building error =>

Build failed: : Failed to build an image. If this error persists, please contact Railway support.

Here is the repo => https://github.com/el7alafawy/server

And here is the FULL LOG =>

Indexed

Compressed [====================] 100%

Uploaded

Build Logs: https://railway.app/project/ea72accd-3e03-4243-af70-c15967c8c734/service/5aac0f54-d660-4baf-9505-f33ec53a2756?id=ab7eaaad-9933-4a1d-acac-2ed0ccc82146&

[Region: us-west1]

Using Nixpacks

context: 2df7fdf2a00e8caaa77ac58bfa987234

╔════════ Nixpacks v1.24.0 ═══════╗

║ setup │ nodejs_18, npm-9_x ║

║─────────────────────────────────║

║ install │ npm ci ║

║─────────────────────────────────║

║ build │ npm run build ║

║─────────────────────────────────║

║ start │ npm run start ║

╚═════════════════════════════════╝

#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile

#1 transferring dockerfile: 2.44kB done

#1 DONE 0.0s

#2 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1716249803

#2 DONE 0.2s

#3 [internal] load .dockerignore

#3 transferring context: 2B done

#3 DONE 0.0s

#4 [stage-0 1/10] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1716249803@sha256:5ef4d2021c418fcaabb56cea5ea9e24a5fdedfe27f58062d9689214dfed45c46

#4 DONE 0.0s

#5 [internal] load build context

#5 transferring context: 299.21kB done

#5 DONE 0.0s

#6 [stage-0 2/10] WORKDIR /app/

#6 CACHED

#7 [stage-0 3/10] COPY .nixpacks/nixpkgs-bf446f08bff6814b569265bef8374cfdd3d8f0e0.nix .nixpacks/nixpkgs-bf446f08bff6814b569265bef8374cfdd3d8f0e0.nix

#7 CACHED

#8 [stage-0 4/10] RUN nix-env -if .nixpacks/nixpkgs-bf446f08bff6814b569265bef8374cfdd3d8f0e0.nix && nix-collect-garbage -d

#8 CACHED

#9 [stage-0 5/10] COPY . /app/.

#9 DONE 0.0s

#10 [stage-0 6/10] RUN --mount=type=cache,id=s/5aac0f54-d660-4baf-9505-f33ec53a2756-/root/npm,target=/root/.npm npm ci

#10 0.505 npm

WARN config production Use --omit=dev instead.

#10 2.911 npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported

#10 2.936 npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.

#10 3.015 npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

#10 3.932

#10 3.932 added 221 packages, and audited 222 packages in 3s

#10 3.932

#10 3.932 27 packages are looking for funding

#10 3.932 run npm fund for details

#10 3.934

#10 3.934 found 0 vulnerabilities

#10 DONE 4.0s

#11 [stage-0 7/10] COPY . /app/.

#11 DONE 0.1s

#12 [stage-0 8/10] RUN --mount=type=cache,id=s/5aac0f54-d660-4baf-9505-f33ec53a2756-node_modules/cache,target=/app/node_modules/.cache npm run build

#12 0.574 npm

WARN config production Use --omit=dev instead.

#12 0.622

#12 0.622 > server@1.0.0 build

#12 0.622 > CI=false tsc

#12 0.622

Build failed: : Failed to build an image. If this error persists, please contact Railway support.

Please assist me with this problem and thanks in advance : )

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

1 Replies


Welcome!

Sign in to your Railway account to join the conversation.

Loading...