chore: fix npm optional dependencies bug in CI

Remove package-lock.json and node_modules before install to properly
handle optional dependencies for rollup, lightningcss, and tailwindcss
native bindings on Linux x64 platform as recommended by npm.
This commit is contained in:
ZacharyZcR
2025-10-10 00:16:34 +08:00
parent d35bd139ae
commit fa3fda4c74

View File

@@ -16,15 +16,11 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Fix optional dependencies
run: |
npm install rollup --force
npm install lightningcss --force
rm -rf node_modules package-lock.json
npm install
- name: Run ESLint
run: npx eslint .