R
Railway•14mo ago
0xaryan

build failing for service

projectId : c1e362ab-eed2-49b9-9f6d-da0f8b163b80 service name: backend serviceId : 9d55a3fb-a425-4b46-8084-b8406f0d8921 The code was getting built fine before; recently, I pushed a change to a branch and it was unable to build it. I am unable to understand the error. the cause I think is
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/Irys-xyz/avsc.git
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/Irys-xyz/avsc.git
not sure why it's throwing because github.com/Irys-xyz/avsc.git is public.
Solution:
even though your successful build and your failed build both use the same nixpacks version, I think it would still be worth it to try an older version of nixpacks, so add this as a railway.toml file to your project
[build]
nixpacksVersion = "1.15.0"
[build]
nixpacksVersion = "1.15.0"
...
Jump to solution
33 Replies
Percy
Percy•14mo ago
Project ID: c1e362ab-eed2-49b9-9f6d-da0f8b163b80,9d55a3fb-a425-4b46-8084-b8406f0d8921
0xaryan
0xaryanOP•14mo ago
Hey @Brody sorry for the ping, can you please help here
Brody
Brody•14mo ago
1. why ping me 2. #🛂|readme #5
0xaryan
0xaryanOP•14mo ago
1. I thought you are in railways team 2. Ah, missed it.
Brody
Brody•14mo ago
if i was that would be an even worse ping for you to do
0xaryan
0xaryanOP•14mo ago
yesser, actually I wanted to push some features to prod but build was failing again and again, so got a bit hasty.
Brody
Brody•14mo ago
well I have no clue what this git ssh thing even is but send your build logs https://bookmarklets.up.railway.app/log-downloader/
0xaryan
0xaryanOP•14mo ago
here's the complete build logs
0xaryan
0xaryanOP•14mo ago
i learned about bookmarklets today, thanks !
Brody
Brody•14mo ago
1. you said this same app has built successfully before, please send build logs for a deployment that built successfully 2. why don't you have a yarn or npm lock file? 3. have you set any build or start commands in the service settings?
0xaryan
0xaryanOP•14mo ago
1. Here are the logs for successful deployment
Brody
Brody•14mo ago
that setup table is very different
0xaryan
0xaryanOP•14mo ago
2. I earlier had a yarn.lock files and build was failing then also, so I removed it to test it out. Here are the logs for it.
0xaryan
0xaryanOP•14mo ago
3. the command is yarn build only
Brody
Brody•14mo ago
that's a completely different error, definitely put your lock file back do you have a build script in your package.json?
0xaryan
0xaryanOP•14mo ago
yes, "build": "npx prisma generate", the codebase is in JS
Brody
Brody•14mo ago
then railway will use that automatically, there is no need to set a build command in the service settings (it's not your problem just stating a fact) haha yes I figured okay what version of node do you use locally
0xaryan
0xaryanOP•14mo ago
yeah, I was not sure of why the code was not building so was just trying out different thing. 20.x v20.6.1
"engines": {
"node": ">=18.18.0"
},
"engines": {
"node": ">=18.18.0"
},
specified this explicitly in package.json after build fail
Brody
Brody•14mo ago
if you delete your node_modules folder, and run yarn install, does it finish without errors?
0xaryan
0xaryanOP•14mo ago
let me give it a try.
0xaryan
0xaryanOP•14mo ago
hm, I got one error while doing yarn install this time, removed 1 package ed25519-supercop and it worked. but still getting some error. specifically linked to
ssh://[email protected]/Irys-xyz/avsc.git
ssh://[email protected]/Irys-xyz/avsc.git
i think
Brody
Brody•14mo ago
do you even know what that git link is for?
0xaryan
0xaryanOP•14mo ago
fetching the dependencies for one of the pkg installed. um, this pkg https://github.com/helius-labs/helius-sdk , uses "@irys/sdk"
Brody
Brody•14mo ago
the build logs for your successful deployment used node 18, but besides your failing builds now using node 20, have you upgraded anything else?
0xaryan
0xaryanOP•14mo ago
um, nothing that I know of. on my local it was always node 20. I specified the engines yesterday in package.json when the build was failing
Brody
Brody•14mo ago
try setting the engines.node to 18 none of that >= stuff
Solution
Brody
Brody•14mo ago
even though your successful build and your failed build both use the same nixpacks version, I think it would still be worth it to try an older version of nixpacks, so add this as a railway.toml file to your project
[build]
nixpacksVersion = "1.15.0"
[build]
nixpacksVersion = "1.15.0"
0xaryan
0xaryanOP•14mo ago
man, it worked. had to remove node_modules + yarn.lock again, reinstall again with nixpacksVersion = "1.15.0"
No description
0xaryan
0xaryanOP•14mo ago
thanks a lot for helping
Brody
Brody•14mo ago
you aren't committing your node_modules to your repo are you?
0xaryan
0xaryanOP•14mo ago
no ser
Brody
Brody•14mo ago
okay good
Want results from more Discord servers?
Add your server