Not getting right node version
toastl
HOBBYOP

8 months ago

https://railway.com/project/cb05a8f8-3ddd-4944-963e-4c8fc403e620/service/3eb40af6-8172-4886-a413-b660c747058a?environmentId=2ab9a759-74a2-4343-bad1-a46351c647fe&id=dc2b51de-6d56-41d4-8f87-859f3c149a84

All right so when i specify nothing it just installs version 18 which i understand. But if i do specify the version in node.js it always installs a version under it.

So for example if i set the version to >=22.12.0 it installs 22.11.0

$10 Bounty

1 Replies

patrikhorvatic
PRO

8 months ago

Few solutions:

In package.json set:

{
  "engines": {
    "node": "22.12"
  },
}

In setting of your project, go to Build section.
If you use Railpack builder, your default version will be the latest 22 because it defaults to it. You can set RAILPACK_NODE_VERSION environment variable for custom version.
docs: https://railpack.com/languages/node

If you use nixpacks, set NIXPACKS_NODE_VERSIONenvironment variable to 22.
docs: https://nixpacks.com/docs/providers/node


Loading...