R
Railwayβ€’13mo ago
Andrew

Failing build for Node.js Fastify server

I have a Node.js Fastify server I've been trying to deploy on Railway. Works perfectly locally as well as other services like Render and Heroku, but I keep running into build failures. It seems to run into the issue when running yarn install :
`#10 1.581 [5/5] Building fresh packages...

#10 2.111 error /app/node_modules/node-libcurl: Command failed.

#10 2.111 Exit code: 1
`#10 1.581 [5/5] Building fresh packages...

#10 2.111 error /app/node_modules/node-libcurl: Command failed.

#10 2.111 Exit code: 1
Attached is a more detailed log. Any help is appreciated!
20 Replies
Percy
Percyβ€’13mo ago
Project ID: 97c38578-2eca-44fa-9439-94f4c2c29861
Andrew
AndrewOPβ€’13mo ago
97c38578-2eca-44fa-9439-94f4c2c29861
Brody
Brodyβ€’13mo ago
Brody
Brodyβ€’13mo ago
try adding this nixpacks.toml to your project
[phases.setup]
nixPkgs = ['...', 'python38', 'gcc']
aptPkgs = ['...', 'libcurl4-gnutls-dev']
[phases.setup]
nixPkgs = ['...', 'python38', 'gcc']
aptPkgs = ['...', 'libcurl4-gnutls-dev']
Andrew
AndrewOPβ€’13mo ago
Added, still failing though
Brody
Brodyβ€’13mo ago
ive updated this, please try with this
Andrew
AndrewOPβ€’13mo ago
Still failing for some reason...
Brody
Brodyβ€’13mo ago
each build log file is bigger than the last lol ive once again updated this πŸ™‚
Andrew
AndrewOPβ€’13mo ago
Still failing πŸ˜…
Brody
Brodyβ€’13mo ago
smaller log size lets try again but if you could provide your repo I can work this out on my own and get back to you with a solution that does work
Andrew
AndrewOPβ€’13mo ago
Sure! What's your Github username? I can share the repo with you, much appreciated πŸ™
Brody
Brodyβ€’13mo ago
brody192
Andrew
AndrewOPβ€’13mo ago
Brody
Brodyβ€’13mo ago
cool, I'll dig into this later in the day when I'm on my computer
Andrew
AndrewOPβ€’13mo ago
Just added you to the repo. Much appreciated!
Solution
Brody
Brodyβ€’13mo ago
Brody
Brodyβ€’13mo ago
yarn run v1.22.19
$ node index.js
timestamp=1699895251564 level=30 msg="Server listening at http://[::]:7561" pid="29" hostname="railway"
yarn run v1.22.19
$ node index.js
timestamp=1699895251564 level=30 msg="Server listening at http://[::]:7561" pid="29" hostname="railway"
Andrew
AndrewOPβ€’13mo ago
Using the Dockerfile worked perfectly. Thanks Brody!
Brody
Brodyβ€’13mo ago
no problem!
Want results from more Discord servers?
Add your server