From 1480b488c0e1ac74ee31d21d711562d5d40186a6 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sat, 4 Jan 2025 13:11:56 +0530 Subject: [PATCH] chore: revert to Node.js 18 due to lack of pkg support for Node.js 22 --- .github/workflows/release-executables.yml | 15 ++++++++------- scripts/pkg-executable/package.json | 12 ++++++------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release-executables.yml b/.github/workflows/release-executables.yml index e86516cbdf..419fa4fdc3 100644 --- a/.github/workflows/release-executables.yml +++ b/.github/workflows/release-executables.yml @@ -63,7 +63,8 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 22.12.0 + # pkg library doesn't have node 22 support + node-version: 18.19.1 - name : Install nocodb, other dependencies and build executables run: | @@ -99,39 +100,39 @@ jobs: # build darwin x64 executable npm uninstall sharp npm install --cpu=x64 --os=darwin sharp - npx --yes pkg@5.8.1 . --compress GZip -t node22-macos-x64 -o Noco-macos-x64 + npx --yes pkg@5.8.1 . --compress GZip -t node18-macos-x64 -o Noco-macos-x64 mv ./Noco-macos-x64 ./mac-dist/ # build darwin arm64 executable npm uninstall sharp npm install --cpu=arm64 --os=darwin sharp - npx --yes pkg@5.8.1 . --compress GZip -t node22-macos-arm64 -o Noco-macos-arm64 + npx --yes pkg@5.8.1 . --compress GZip -t node18-macos-arm64 -o Noco-macos-arm64 mv ./Noco-macos-arm64 ./mac-dist/ # build linux x64 executable npm uninstall sharp npm install --cpu=x64 --os=linux sharp - npx --yes pkg@5.8.1 . --compress GZip -t node22-linux-x64 -o Noco-linux-x64 + npx --yes pkg@5.8.1 . --compress GZip -t node18-linux-x64 -o Noco-linux-x64 mv ./Noco-linux-x64 ./dist/ # build linux arm64 executable npm uninstall sharp npm install --cpu=arm64 --os=linux sharp - npx --yes pkg@5.8.1 . --compress GZip -t node22-linux-arm64 -o Noco-linux-arm64 + npx --yes pkg@5.8.1 . --compress GZip -t node18-linux-arm64 -o Noco-linux-arm64 mv ./Noco-linux-arm64 ./dist/ # build windows x64 executable npm uninstall sharp npm install --cpu=x64 --os=win32 sharp - npx --yes pkg@5.8.1 . --compress GZip -t node22-win-x64 -o Noco-win-x64.exe + npx --yes pkg@5.8.1 . --compress GZip -t node18-win-x64 -o Noco-win-x64.exe mv ./Noco-win-x64.exe ./dist/ # build windows arm64 executable npm uninstall sharp npm install --cpu=arm64 --os=win32 sharp - npx --yes pkg@5.8.1 . --compress GZip -t node22-win-arm64 -o Noco-win-arm64.exe + npx --yes pkg@5.8.1 . --compress GZip -t node18-win-arm64 -o Noco-win-arm64.exe mv ./Noco-win-arm64.exe ./dist/ - name: Upload executables to asset diff --git a/scripts/pkg-executable/package.json b/scripts/pkg-executable/package.json index 62be185664..e6003e9c5a 100644 --- a/scripts/pkg-executable/package.json +++ b/scripts/pkg-executable/package.json @@ -15,12 +15,12 @@ "node_modules/**/*" ], "targets": [ - "node22-linux-arm64", - "node22-macos-arm64", - "node22-win-arm64", - "node22-linux-x64", - "node22-macos-x64", - "node22-win-x64" + "node18-linux-arm64", + "node18-macos-arm64", + "node18-win-arm64", + "node18-linux-x64", + "node18-macos-x64", + "node18-win-x64" ] }, "keywords": [],