R
Railway12mo ago
Elom

Railway deployment fails with "node-gyp-build error"

Hello, am new on railway and i am getting these errors when i try to deploy my nodejs express API, but everything work well on local and other servers. Can someone help me with this please ? Last Deployment Id: 01044eee-19e1-41f5-b965-915b144982f4 Project id : f083e293-6fa8-47f0-8d44-d5c5f4341a8a Build logs:
16 Replies
Percy
Percy12mo ago
Project ID: 01044eee-19e1-41f5-b965-915b144982f4,f083e293-6fa8-47f0-8d44-d5c5f4341a8a
Brody
Brody12mo ago
please use this to send your logs https://bookmarklets.up.railway.app/log-downloader/
Brody
Brody12mo ago
try adding a nixpacks.toml file to your project with this in it
[phases.setup]
nixPkgs = ['...', 'python38', 'gcc', 'libusb1']
[phases.setup]
nixPkgs = ['...', 'python38', 'gcc', 'libusb1']
Elom
ElomOP12mo ago
Get this error now :
Brody
Brody12mo ago
progress
Elom
ElomOP12mo ago
yes, sure
Brody
Brody12mo ago
updated this if you could provide your repo that would help a lot it looks like youre trying to install this npm package? https://www.npmjs.com/package/usb there arent going to be any usb devices available when on railway, can you share why you are using this package?
Elom
ElomOP12mo ago
am not using this package, maybe one of my lib are using it. Can u give me your github username, i'll add you to the repo if you want
Elom
ElomOP12mo ago
Get this error when trying your last suggestion
Brody
Brody12mo ago
brody192
Elom
ElomOP12mo ago
I've added you to the repository, the usb error comes from the aleph-sdk-ts module, because when I remove it everything seems to work. Thanks for your help
Brody
Brody12mo ago
ah okay cool, if you can, don't use modules that are dependent on usb libraries, you wouldn't be able to access any usb devices on a hosted environment like railway
Elom
ElomOP12mo ago
I really need this package for my project, how can i use it without theses errors and usb problems ?
Brody
Brody12mo ago
this is very likely the package that is needing the usb system library https://www.npmjs.com/package/@ledgerhq/hw-transport-webusb it's listed in the dependencies of aleph-sdk-ts, do you use this functionality?
Elom
ElomOP12mo ago
No, I don't use this functionality in my project
Want results from more Discord servers?
Add your server