ci: fix next build failure and update workflow actions - #120
Open
katsugtgz wants to merge 1 commit into
Open
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-insightsline was pasted at the end ofapp/layout.tsx, after the closing brace, which is a syntax error webpack rejects. The package is already inpackage.json, so the line is simply removed.There is a second failure hiding behind the first:
next buildseesapp/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 withThe "id" argument must be of type string. Pinningtypescript5 as a devDependency and committing the generatedtsconfig.jsonandnext-env.d.tsmakes the build deterministic.Also updates the GitHub Actions references that were on deprecated node16/node20 runtimes or old majors:
actions/checkoutv2/v3/v4 to v7,actions/setup-nodev3/v4 to v7,github/codeql-actionv3 to v4,actions/configure-pagesv5 to v6,actions/upload-pages-artifactv3 to v5,actions/deploy-pagesv4 to v5.actions/jekyll-build-pagesstays on v1, still the current major. The node-version pins 16 and 18 are EOL and move to 20 LTS.Validation:
npm cithennpx next buildon this branch: compiles and prerenders successfullyScope:
.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.