Skip to content

ci: fix next build failure and update workflow actions - #120

Open
katsugtgz wants to merge 1 commit into
Ze0ro99:mainfrom
katsugtgz:ci/update-workflows-fix-build
Open

ci: fix next build failure and update workflow actions#120
katsugtgz wants to merge 1 commit into
Ze0ro99:mainfrom
katsugtgz:ci/update-workflows-fix-build

Conversation

@katsugtgz

@katsugtgz katsugtgz commented Sep 8, 2026

Copy link
Copy Markdown

Fixes the failing deploy workflow and updates the workflow actions to current majors.

The deploy job has failed on every run since Aug 8. The build step dies because a stray npm install @vercel/speed-insights line was pasted at the end of app/layout.tsx, after the closing brace, which is a syntax error webpack rejects. The package is already in package.json, so the line is simply removed.

There is a second failure hiding behind the first: next build sees app/layout.tsx, finds no TypeScript toolchain, and auto-installs devDependencies mid-build. That currently resolves to typescript 7, which crashes the Next.js 14 build worker with The "id" argument must be of type string. Pinning typescript 5 as a devDependency and committing the generated tsconfig.json and next-env.d.ts makes the build deterministic.

Also updates the GitHub Actions references that were on deprecated node16/node20 runtimes or old majors: actions/checkout v2/v3/v4 to v7, actions/setup-node v3/v4 to v7, github/codeql-action v3 to v4, actions/configure-pages v5 to v6, actions/upload-pages-artifact v3 to v5, actions/deploy-pages v4 to v5. actions/jekyll-build-pages stays on v1, still the current major. The node-version pins 16 and 18 are EOL and move to 20 LTS.

Validation:

  • npm ci then npx next build on this branch: compiles and prerenders successfully
  • all six workflow files pass YAML parse
  • latest majors resolved live from each action's releases endpoint (checkout v7.0.1, setup-node v7.0.0, codeql-action v4.37.9, configure-pages v6.0.0, upload-pages-artifact v5.0.0, deploy-pages v5.0.1)

Scope: .github/workflows/*, app/layout.tsx, package.json, package-lock.json, tsconfig.json, next-env.d.ts.

Note: workflow runs on this PR are queued behind maintainer approval (action_required), the usual state for a first PR from a fork. The validation above was run locally on the branch head.

- remove stray npm install line at end of app/layout.tsx that broke the build
- pin typescript 5 as devDependency; next build otherwise auto-installs typescript 7 which crashes the build worker
- commit tsconfig.json and next-env.d.ts generated by next build
- update actions to current majors: checkout v7, setup-node v7, codeql-action v4, configure-pages v6, upload-pages-artifact v5, deploy-pages v5
- bump node-version 16/18 to 20 LTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant