5 months ago
Hello everyone,
I'm encountering a critical deployment failure on Railway and would greatly appreciate your expertise in debugging this issue. Here's a complete breakdown of the problem:
Project Overview
Commit: c7155b9 (latest)
Platform: Railway (us-west1 region)
Build System: Nixpacks v1.38.0
Stack: Node.js 22 + npm 9.x
Framework: Discord.js
Error Description
The build fails silently during the image creation phase with no clear error message. The process stops abruptly after the COPY . /app command in Nixpacks.
Complete Logs
Nixpacks Output:
[Region: us-west1]
[stage-0 3/8] COPY .nixpacks/nixpkgs-*.nix β 19s
[stage-0 8/8] COPY . /app
# Process terminates here with no further outputRailway UI Error:
- Deployment failed during build process
! Build > Build image: Failed to build an image
- Deploy: Not started
- Post-deploy: Not startedπ Troubleshooting Attempts
AttemptResultRebuild without cacheSame failureDowngrade to Node.js 20Identical behaviorVerified file permissionsNo issues foundLocal build with nixpacks build .
Technical Analysis
Project Structure:
bot-discord/
βββ .nixpacks/
β βββ nixpkgs-*.nix
βββ node_modules/ (38MB)
βββ src/
βββ package.json
βββ index.jsKey Config Files:
package.json:
{
"scripts": {
"start": "node index.js",
"build": ""
}
}.nixpacks/nixpkgs-*.nix:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = [ pkgs.nodejs-22_x pkgs.npm ];
}β Hypotheses
Size Limitations:
38MB
node_modulescausing timeout during copyPossible memory limits exceeded (2GB default on Railway?)
Compatibility Issues:
Node.js 22 too new for Nixpacks
Known issues with npm 9.x
Configuration Problems:
Empty
buildscript in package.jsonMissing files in Docker context
Specific Requests for Help
How to access complete build logs?
Are there hidden Docker/Nixpacks logs on Railway?
CLI command to get verbose output?
Alternative solutions:
Working Dockerfile example for Node.js 22
Optimal Nixpacks configuration for recent Node.js
Advanced debugging:
How to reproduce Railway's build constraints locally?
Tools to monitor memory usage during build?
Final Appeal
I've been stuck on this for days and would deeply appreciate any assistance. I'm available to:
Provide temporary project access
Run additional tests
Supply more information as needed
Thank you in advance for your time and expertise!
1 Replies
5 months ago
Give Railpack a try β it could handle the build differently and help get things moving.