2 years ago
I've been trying to deploy a project in .ode, js and Typescript for hours but I get this error.
[Region: us-west1]
==============
Using Nixpacks
==============
context: 688c7dae3c2e5baca30a3128008fa13a
╔════════════ Nixpacks v1.31.0 ════════════╗
║ setup │ nodejs_18, npm-9_x, openssl ║
║──────────────────────────────────────────║
║ install │ npm i ║
║──────────────────────────────────────────║
║ build │ npm run build ║
║──────────────────────────────────────────║
║ start │ npm start ║
╚══════════════════════════════════════════╝
#0 building with "builder-wie2" instance using docker-container driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 2.33kB done
#1 DONE 0.0s
#2 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1736208272
#2 DONE 0.1s
#3 [stage-0 1/8] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1736208272@sha256:373a5b6b1b703c1b8cb6e5bf9c0147a22b54f0497265fd108c303aaf4032b6c9
#3 resolve ghcr.io/railwayapp/nixpacks:ubuntu-1736208272@sha256:373a5b6b1b703c1b8cb6e5bf9c0147a22b54f0497265fd108c303aaf4032b6c9 0.0s done
#3 DONE 0.0s
#4 [stage-0 2/8] WORKDIR /app/
#4 CACHED
#5 [internal] load .dockerignore
#5 transferring context: 2B done
#5 DONE 0.0s
#6 [internal] load build context
#6 transferring context: 65.12kB done
#6 DONE 0.0s
#7 [stage-0 3/10] COPY .nixpacks/nixpkgs-5624e1334b26ddc18da37e132b6fa8e93b481468.nix .nixpacks/nixpkgs-5624e1334b26ddc18da37e132b6fa8e93b481468.nix
#7 DONE 0.5s
#8 [stage-0 4/10] RUN nix-env -if .nixpacks/nixpkgs-5624e1334b26ddc18da37e132b6fa8e93b481468.nix && nix-collect-garbage -d
ⓘ Deployment information is only viewable by project members and Railway employees.
1 Replies
2 years ago
Hello,
You were trying to use the private network during build, but the private network isn't available during build.
It took a little trial and error given I know nothing about your project, but..
To fix this, I have done for you -
- Disabled the postinstall script with
NIXPACKS_INSTALL_CMD="npm install --ignore-scripts"so that the database isn't accessed during build. - Set your build command to
trueas a way to skipnpm run buildfrom being ran during build. - Set your start command to
npx prisma generate && npx prisma db push && npm run build && npm startto run everything during runtime when we actually have access to the private network.
After all this, looks like your deployment is online and responsive!
Best,
Brody