Compare commits

..

2 Commits

Author SHA1 Message Date
e739f6aaff fix: check Node.js version, not just presence, in CI
Some checks failed
Build App / build-macos (push) Successful in 2m23s
Build App / build-linux (push) Failing after 3m38s
Build App / build-windows (push) Successful in 4m1s
The Act runner has Node.js v18 pre-installed, so the check
`command -v node` passes and skips installing v22. Node 18 is
too old for dependencies like vitest, jsdom, and tailwindcss/oxide.
Now checks the major version and upgrades if < 22.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:54:36 -08:00
550159fc63 Fix native binding error: use npm install instead of npm ci
Some checks failed
Build App / build-linux (push) Failing after 2m25s
Build App / build-macos (push) Successful in 2m34s
Build App / build-windows (push) Successful in 4m8s
@tailwindcss/oxide has platform-specific native bindings. The
package-lock.json was generated on a different platform, so npm ci
installs the wrong native binary. Switching to rm -rf node_modules
+ npm install lets npm resolve the correct platform-specific
optional dependency (e.g., @tailwindcss/oxide-linux-x64-gnu on
Linux, oxide-darwin-arm64 on macOS).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:44:03 -08:00

View File

@@ -20,12 +20,21 @@ jobs:
build-linux: build-linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Install Node.js - name: Install Node.js 22
run: | run: |
NEED_INSTALL=false
if command -v node >/dev/null 2>&1; then if command -v node >/dev/null 2>&1; then
echo "Node.js already installed: $(node --version)" NODE_MAJOR=$(node --version | sed 's/v\([0-9]*\).*/\1/')
echo "Found Node.js $(node --version) (major: ${NODE_MAJOR})"
if [ "$NODE_MAJOR" -lt 22 ]; then
echo "Node.js ${NODE_MAJOR} is too old, upgrading to 22..."
NEED_INSTALL=true
fi
else else
echo "Installing Node.js 22..." echo "Node.js not found, installing 22..."
NEED_INSTALL=true
fi
if [ "$NEED_INSTALL" = true ]; then
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs sudo apt-get install -y nodejs
fi fi
@@ -87,7 +96,9 @@ jobs:
- name: Install frontend dependencies - name: Install frontend dependencies
working-directory: ./app working-directory: ./app
run: npm ci run: |
rm -rf node_modules
npm install
- name: Install Tauri CLI - name: Install Tauri CLI
working-directory: ./app working-directory: ./app
@@ -138,12 +149,21 @@ jobs:
build-macos: build-macos:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- name: Install Node.js - name: Install Node.js 22
run: | run: |
NEED_INSTALL=false
if command -v node >/dev/null 2>&1; then if command -v node >/dev/null 2>&1; then
echo "Node.js already installed: $(node --version)" NODE_MAJOR=$(node --version | sed 's/v\([0-9]*\).*/\1/')
echo "Found Node.js $(node --version) (major: ${NODE_MAJOR})"
if [ "$NODE_MAJOR" -lt 22 ]; then
echo "Node.js ${NODE_MAJOR} is too old, upgrading to 22..."
NEED_INSTALL=true
fi
else else
echo "Installing Node.js 22 via Homebrew..." echo "Node.js not found, installing 22..."
NEED_INSTALL=true
fi
if [ "$NEED_INSTALL" = true ]; then
brew install node@22 brew install node@22
brew link --overwrite node@22 brew link --overwrite node@22
fi fi
@@ -187,7 +207,9 @@ jobs:
- name: Install frontend dependencies - name: Install frontend dependencies
working-directory: ./app working-directory: ./app
run: npm ci run: |
rm -rf node_modules
npm install
- name: Install Tauri CLI - name: Install Tauri CLI
working-directory: ./app working-directory: ./app