a month ago
Hello i have this issue for a while i'm new to Railway and everytime i try to build or push the deployment it fails , i had the service already running on replit but now i want to host it on Railway , i get errors regarding the Nodesjs version 22 , 24 , 20 etc and also regarding the Docker , i tried a lot of fixes but nothing is working
Attachments
45 Replies
a month ago
Have you checked out line 4 (or in that area) of your Nixpacks config?
a month ago
(Also, I'd recommend migrating to Docker or Railpack as Nixpacks is deprecated)
for some reason i'm getting this Vite error even though BASE_PATH: Set this to /
variable DATABASE_URL: set to my Neon PostgreSQL connection string (including ?sslmode=require at the end).
Attachments
hitting a very specific version requirement: Vite 7 requires Node 22.12+, but your current environment is providing 22.11.0.
Attachments
a month ago
Does your code compile locally?
a month ago
Through Nixpacks?
it compiles locally on Replit. The build failure on Railway is due to Vite 7's Node.js engine requirements. My project requires Node v22.12+, but the current Nixpacks environment is providing v22.11.0, which Vite rejects.
Attachments
a month ago
Have you tried manually setting the Node version to 22.12 through environment variables? ()
yeah i did
Attachments
a month ago
Locally, delete node_modules and pnpm-lock.yaml. Then, run pnpm i.
After, commit the new lockfile.
Additionally, I would suggest using pnpm ci as your install command instead of what you currently have now.
yeah my project is using Drizzle ORM but for some reason on railway it was trying to find Prisma schema
a month ago
I’d make sure none of your deploy/predeploy commands involve Prisma, as well as any database operations in your codebase.
the build work now all good thanks but the only issue that still here is deployment issue
a month ago
Can you provide deployment logs?
(no markdown available for this content)
Attachments
a month ago
I'd start a vite dev server locally and debug from there.
he error is happening because path-to-regexp (the library used by Express and other routers) no longer supports the unnamed wildcard () in newer versions. It now requires every parameter, including wildcards, to have a name. tried to change '/crm/'
to:
'/crm/:path*)'
Downgrading Node.js from version 22 to 20 didn't work either
he issue is likely that your project is still pulling in Express 5 (beta/stable) or path-to-regexp v8+ via your package.json or package-lock.json
i will try Force Downgrade to Express 4
a month ago
Try something like /crm/{*splat} instead of /crm/*.
a month ago
Have you tried the braces though?
whats wrong with the variables when one of them is purple everytime i change it it resets back to the old value even if i delete it it just pops back again with the wrong old value bro even after redeploying
Attachments
a month ago
I assume you fixed it?
a month ago
@♛ Adams ♛ The link that was sent there is malicious!!!! Do not go there
Railway's own diagnosis confirms what we already saw — this is on Railway's infrastructure side, not your code. There's nothing for me to fix or plan as a task here.
Your two paths forward, in order of effort:
Try first (30 seconds, sometimes works):
Make any tiny commit to the repo (even a one-character whitespace change in the README) and push it. A fresh GitHub webhook event sometimes shakes Railway's snapshot fetcher loose when manual retriggers won't.
If that doesn't work (the real fix):
Open Railway support and give them this exact info:
Service: H-Analytics
Environment: production
Deployment ID: 1d55cf98-20a9-4fcf-a2f2-fc0e9a5b654d
Symptom: Snapshot step times out at 60s. Repeated 9+ times. Repo Norfolk-Group/H-Analytics is accessible.
i have this same issue again man , Nixpack.toml , Railway and Railpack.json and Package.json also Docker all these files kinda conflict as i have Monorepo + another python service all living in the same project as 2 repo i might need to split them on 2 work spaces
17 days ago
You can use different railway.json files for each "subservice."
Eg, you can name it like subservice1.railway.json, subservice2.railway.json, etc.
17 days ago
You'll need to manually declare which config file to use in your Railway dashboard though.
17 days ago
You can lookup how to configure the json files here:
To declare which specific configuration to use in your service, go to its settings and scroll all the way down, and you'll see a place to put the path to the Railway config file.
17 days ago
Something like this:
Attachments
thanks that would help , also do i need Nixpack.toml and Dockerfile etc ? or just railway.json ?
17 days ago
If you wish to use Dockerfile to build your application, then yes you'd still need it.
Also, I'd recommend migrating from Nixpack to Railpack as Nixpack is deprecated.
i don't even know why its using Dockerfile its a python Playwright + Crawl4AI service
Attachments