diff --git a/.github/workflows/check_code_formatting.yml b/.github/workflows/check_code_formatting.yml index 60f46606b..20f624122 100644 --- a/.github/workflows/check_code_formatting.yml +++ b/.github/workflows/check_code_formatting.yml @@ -14,9 +14,9 @@ jobs: uses: actions/checkout@v2 - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version-file: '.node-version' - name: Install dependencies run: npm install diff --git a/.github/workflows/npm_publish.yml b/.github/workflows/npm_publish.yml index 2934f7513..7e26c641e 100644 --- a/.github/workflows/npm_publish.yml +++ b/.github/workflows/npm_publish.yml @@ -9,9 +9,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version-file: '.node-version' registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: npm ci diff --git a/.node-version b/.node-version new file mode 100644 index 000000000..ccc4c6c7f --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20.20.2 diff --git a/docs/installation-deployments.md b/docs/installation-deployments.md index 8a4b8b051..58234b00e 100644 --- a/docs/installation-deployments.md +++ b/docs/installation-deployments.md @@ -48,6 +48,8 @@ $ bunx @portkey-ai/gateway ### NodeJS Server +> **Node.js version:** this project targets Node.js `>=20.9.0` (see `.node-version` and the `engines` field in `package.json`). If you use a version manager like `nvm`, `fnm`, `asdf`, `mise`, or `nodenv`, it will pick the pinned version up automatically. + 1. Clone the Repository ```sh diff --git a/package.json b/package.json index 30ba6551b..c9671dc63 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,8 @@ "wrangler": "^3.97.0" }, "bin": "build/start-server.js", - "type": "module" + "type": "module", + "engines": { + "node": ">=20.9.0" + } }