GitHub Actions and IaC - TypeScript SDK issue
escherwd
FREEOP

22 days ago

Hello, apologies if this has been posted before, but I am attempting to use GitHub Actions to apply my IaC config file (.railway/railway.ts) on commit, but keep running into an issue with the Railway TypeScript SDK not being available. Has anyone else successfully set up a workflow like this?

First iteration of my .github/workflows/deploy.yaml file (based off this guide):


name: Deploy to Railway

on:

  push:

    branches:

      - develop

jobs:

  deploy:

    runs-on: ubuntu-latest

    container: ghcr.io/railwayapp/cli:latest

    env:

      RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN_DEV }}

    steps:

      - uses: actions/checkout@v3
      - run: |

          # Send config

          railway config apply --yes

          # Upload service

          railway up --service=web -c

Resulting error:


Run railway config apply --yes

Could not find Railway configuration support for this project. Install the Railway TypeScript SDK, then run this command again: https://github.com/railwayapp/railway-ts-sdk

Caused by:

    No such file or directory (os error 2)

Second iteration, manually installing node/npm, manually installing the railway CLI and railway npm package (included in project's package.json):


name: Deploy to Railway

on:

  push:

    branches:

      - develop

jobs:

  deploy:

    runs-on: ubuntu-latest

    env:

      RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN_PROD }}

    steps:  

      - name: "Checkout"

        uses: actions/checkout@v3

      - name: "Install Node"

        uses: actions/setup-node@v7

        with:

          node-version: '26'

      - name: "Install Railway CLI"

        shell: bash

        run: bash <(curl -fsSL railway.com/install.sh) -y

      - name: "Install Railway TS dependancy"

        shell: bash

        run: npm ci

      - name: "Apply new Railway IaC Config"

        shell: bash

        run: ~/.railway/bin/railway config apply --yes

      - name: "Upload to Railway"

        shell: bash

        run: ~/.railway/bin/railway up --service=web -c

Once again:


Run ~/.railway/bin/railway config apply --yes

Could not find Railway configuration support for this project. Install the Railway TypeScript SDK, then run this command again: https://github.com/railwayapp/railway-ts-sdk

Caused by:

    No such file or directory (os error 2)

Any help or advice would be greatly appreciated!

$10 Bounty

2 Replies

Railway
BOT

22 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 22 days ago



kaijakagi-sys
FREETop 10% Contributor

2 hours ago

That specific error is worth separating from a GitHub outage: in the CLI v5.20.0 source, “Could not find Railway configuration support…” wraps failure to spawn the local IaC runner. os error 2 means the executable/startup path was not found; it is not a parsed response from GitHub or proof that your TypeScript file failed.

That version looks for railway-iac-ts in ancestor node_modules/.bin directories, then PATH; it also supports an explicit --runner path. Your actual CLI version wasn't included, so I would first check that version and the local runner in the same working directory used by the failing step:

~/.railway/bin/railway --version
node --version
npm ls railway --depth=0
ls -l node_modules/.bin/railway-iac-ts

These inspect versions/the local link; they do not apply infrastructure changes. If the link is absent, check whether the SDK was installed in a different workspace directory or omitted as a development dependency. If it exists, inspect its target and interpreter before reinstalling anything. A missing executable and a missing script interpreter can both fail at process startup.

I checked missing executables, an existing script with a missing interpreter, and a working explicit executable with inert local shell fixtures, not your GitHub workflow or a Railway deployment. I have not established which local path is missing in your run. Please share only the versions and whether that link/target exists, not environment values or credentials. Once that boundary is known, the correction can be scoped without repeatedly running config apply or changing production.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...