Error deploying Angular 20 on Railway: Node.js unsupported version (v22.11.0 instead of v20.19...

Discussão em 'Angular' iniciado por Angel Rodriguez Loa, Agosto 29, 2025.

  1. I am trying to deploy an Angular v20 project on Railway, linked to my GitHub repository.

    During the build phase, Railway detects a Node.js version that is not supported by Angular CLI.

    Error I get

    Node.js version v22.11.0 detected.
    The Angular CLI requires a minimum Node.js version of v20.19 or v22.12.

    Please update your Node.js version or visit https://nodejs.org/ for additional instructions.


    And the full build log ends with:

    ✕ [stage-0 8/10] RUN npm run build
    process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 3

    What I’ve tried


    1. I configured the environment variable in Railway:
      NIXPACKS_NODE_VERSION=22.12.0


    2. I also tried:
      NIXPACKS_NODE_VERSION=20.19.0

      But Railway installs 20.18.x, which is also not supported by Angular 20 (requires at least 20.19).


    3. I added the engines section to my package.json:

      "engines": {
      "node": ">=20.19.0 <21 || >=22.12.0"
      }



      However, Railway still uses either 22.11.0 or 20.18.0.


    4. I tested with a railway.json file to specify the output directory, but the problem happens earlier, during the ng build step.
    My situation


    It seems that Railway doesn’t yet provide the exact Node versions 20.19.0 or 22.12.0, so Angular 20 cannot be built.
    I would prefer not to use a Dockerfile for now, because I don't know how works it..

    My questions are:


    • Is there any way to force Railway to use Node v20.19.0 or v22.12.0?


    • Is there a recommended alternative to deploy Angular 20 on Railway without relying on a Dockerfile?


    • Am I missing some extra configuration in Railway or package.json?

    Continue reading...

Compartilhe esta Página