R
Railway

✋|help

Builds fail due to nixpack using nodejs_20 instead of nodejs_18

Rremkim9/20/2023
My builds fail need some attention please.

Previous successful build: nixpack 1.15 nodejs_18

Failing build: nixpack 1.16 nodejs_20

Error 1.866 error @azure/msal-node@1.14.4: The engine "node" is incompatible with this module. Expected version "10 12 14 16 18". Got "20.6.1"
Solution:
I fixed it by adding railway.json and pinning nixpack version
Jump to solution
Bbrody1929/20/2023
are you somewhere specifying you want to use node 20?
Rremkim9/20/2023
No, i don't
is there anyway I can pin the version?
Bbrody1929/20/2023
set engines.node to 18 in your package.json
Nngeloxyz9/20/2023
@Rem Kim - Did that suggestion work?
RARami Abdou9/20/2023
Hopping in here - I had the same issue, and I just updated my engines.node from ">=16.0.0" to ">=16.0.0 <20.0.0", and it fixed my builds! ✅

Looks like Nixpacks v1.16.0 shipped with Node 20 as the default?
Bbrody1929/20/2023
nixpacks v1.16.0 added support for node 20, and node 20 is greater than node 16, previously the max supported was 18
the default node version in nixpacks v1.16.0 is now set to 18
Nngeloxyz9/20/2023
Yep if you don't pin it, we use latest even by default since it's LTS
RARami Abdou9/20/2023
If the default version is now 18 (with 20 now being supported), is it expected behavior that Nixpacks will choose 20 if my engines.node is set to ">=16.0.0"?
@Angelo Beat me to it, thanks!
Nngeloxyz9/20/2023
Engines will use the latest lts
Bbrody1929/20/2023
well version 20 is greater than 16, so it did give you what you asked for lol
RARami Abdou9/20/2023
Got it, thanks for the help!
Bbrody1929/20/2023
no problem!
Solution
Rremkim9/21/2023
I fixed it by adding railway.json and pinning nixpack version
Nngeloxyz9/21/2023
Woohoo, again, sorry that you faced this issue - rough patch on the Node 16 LTS EOL
Locking thread.

Looking for more? Join the community!

Recommended Posts
why is the deployment with no change failing now?ERROR: failed to solve: process "/bin/bash -ol pipefail -c apt-get update && apt-get install -y --nowebsocket: bad handshake with gorilla websocketsi have a websocket server running on railway with a custom domain, and when going to the websocket rRefund requestHello, I haven't used your service for a while and overlooked the need to unlink my card. Can I pleaHow can I add a json file to my mongoDB with railway?I have a json file containing all of the record my project needs, it is called `sectorA` I want to acould not receive data from client: Connection reset by peerI'm having issues with the DB connection, keep getting: `could not receive data from client: Connectjava.lang.UnsupportedClassVersionErrorHow fix it? I use java 19Add domain to webapp - how?I initially (½ year ago), added my domain under settings - setup the records as described, and it waError adding TCP proxy - Not AuthorizedHello I deployed a service based on a docker image, in order to connect to the service I try to set A way to increase the build timeoutI would like to know if there is a way to increase the build timeout, as I have a very large nextjs TLS handshake timeout during transition from build to deployMy sites have been failing to deploy the whole day + yesterday. I see that this was an issue multiplsave file on file system not foundi've create api to save file to public files after i upload new file on railway host, 404 where i Can I create an environment from a secondary branch of a GitHub repository?Hello, I have a Node.js web app on Railway, and I'm looking for a way to create a second instance fServer becomes unresponsiveCan someone please help me figure out what occurred Saturday? Our production site was not accessibleProject with cron job aways skippedWhy my project nevers run with cronMaximum of 4 volumes per project?Heya 🌞 I have several services and would need to attach another volume to one of these but it get aAny way to skip redeployment if github ci is skipped?Here's what I see on dashboard, railway is granted all accesses in my org on github. On github I caBuild Error after RedeployRecently, I've been facing a weird error whenever I redeploy my railway instance from the dashboard.Restarting database not working.My postgres database wont restart. All data is not modifiy after restaring it.Adding support for python with isolated-vm npm packageHello, I am using a project that requires the isolated-vm npm package (https://www.npmjs.com/packageListmonk; Static FilesNot sure why my post was deleted, but here it is again: Hello, I've deployed Listmonk on Railway,