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
P
Percy16d ago
Project ID: 8a8bfe2d-1094-4b5f-834a-eba6388d0180
N
Nicky16d ago
project ID: 8a8bfe2d-1094-4b5f-834a-eba6388d0180
Solution
B
Brody15d ago
You kinda answered it yourself.. Use a custom Dockerfile for the build
N
Nicky15d ago
I was hoping there would be an easier solution but thanks 😅
B
Brody15d 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
More Posts
Cron job not running at specific timeHi I have a cron job that should run every hour 0 * * * *. For some reason, it skips runs sometimHow much is Railways scalable?Is there any information how much it is scalable in reality? According to the price, can the serviceCORS Policy problem with backboard.railway.app/graphqlI'm getting a CORS error in my console when using the Railway dashboard. ``` Access to fetch at 'hOutbound ip addressesHi, what are railway's outbound ip addressesBest way to setup back up system for my postgres?Looking to do a backup every X number of hoursRailway <> Hetzner servers cant communicateWe had a deployment running succesfully for the last week today, the railway instances cant communihow to remove docker cache ?it is always just using cache, and not rebuilding correclyDeployment HelpApologies i have 3 things to deploy and i dont know how to do itCannot Access Railway APIJust noticed that I am unable to access the full public API and the GraphQL Playground isn't workingHow do I create a config file?In the [documentation](<https://docs.railway.app/guides/config-as-code>) for Railway configuration fRedis Connection FailureProject ID: d09cd450-b0ba-483f-ae0c-5e329305f433 Redis is refusing connnections.504 Gateway Timeout issueAll of a sudden my production application starts throwing up 504 error. There are no error logs and Vite React ThreejsI copy nixpacks.toml and Caddyfile from this repository <https://github.com/brody192/vite-react-temSQLalchemy could not translate host name "postgres.railway.internal"Basically I'm making a engine with env var stored in DATABASE_PRIVATE_URL that references my Postgre