R
Railway•8mo ago
Nicky

What is the best way to install private npm packages?

My usecase is that my node app needs to install a package from a private github registry. What I would normally expect is to be able to pass a .npmrc (like Vercel) or a token from the env variables and have the usual installation during the build step. As per my understanding this is not currently supported by railway. So my question is, what would be the best workaround in this case? I'm not using a custom dockerfile for the build.
Solution:
You kinda answered it yourself.. Use a custom Dockerfile for the build
Jump to solution
5 Replies
Percy
Percy•8mo ago
Project ID: 8a8bfe2d-1094-4b5f-834a-eba6388d0180
Nicky
NickyOP•8mo ago
project ID: 8a8bfe2d-1094-4b5f-834a-eba6388d0180
Solution
Brody
Brody•8mo ago
You kinda answered it yourself.. Use a custom Dockerfile for the build
Nicky
NickyOP•8mo ago
I was hoping there would be an easier solution but thanks 😅
Brody
Brody•8mo ago
That is the easiest solution, also means you dont have to rely on nixpacks to not break
Want results from more Discord servers?
Add your server