lts node 22 outdated

normanzbPRO

4 months ago

gm all,

we are deploying our node based service via nixpacks and has specified the node engine version inside package.json as following:

  "engines": {
    "node": ">=22.13.1"
  },

22.13.1 is the latest node js lts version and it seems to fix a bug in fetch() so we were trying to test that out.

However when deploy we got this error:

The engine "node" is incompatible with this module. Expected version ">=22.13.1 <23". Got "22.10.0"

we've checked nixpkgs the latest node 22 is exactly 22.13.1, and we've tried using env var NIXPACKS_NODE_VERSION or nixpacks.toml to force the node version, none of these works.

is there some cache in railway or nixpack that prevent us from using latest LTS?

Solved

4 Replies

3 months ago

Hello,

You cannot specify minor or patch versions of any language, only the 22 would be taken into account.

You can attempt to get around this by setting an archive.

Add this nixpacks.toml to your repo -

[phases.setup]
	nixpkgsArchive = '51ad838b03a05b1de6f9f2a0fffecee64a9788ee' # 22.13.1 - https://github.com/NixOS/nixpkgs/commit/51ad838b03a05b1de6f9f2a0fffecee64a9788ee

Status changed to Awaiting User Response railway[bot] 3 months ago


normanzbPRO

3 months ago

thanks @brody will give it a try and report back


Status changed to Awaiting Railway Response railway[bot] 3 months ago


normanzbPRO

3 months ago

Thanks, it works!


3 months ago

Awsome!


Status changed to Awaiting User Response railway[bot] 3 months ago


Status changed to Solved brody 3 months ago


lts node 22 outdated - Railway Help Station