Skip to content

Update Node.js to v20 and fix lint command for Next.js 16 compatibility - #105

Merged
dcotelo merged 5 commits into
snyk-fix-8d156fcd1018c01abb3a73b896c7eb50from
copilot/sub-pr-104
Feb 9, 2026
Merged

dcotelo merged 5 commits into
snyk-fix-8d156fcd1018c01abb3a73b896c7eb50from
copilot/sub-pr-104

Conversation

Copilot AI commented Feb 9, 2026 •

Copy link
Copy Markdown
Contributor

Next.js 16 requires Node.js >=20.9.0 and removed the next lint CLI command. CI workflows, Cloudflare Pages, and package configuration were still using Node.js 18 and the deprecated lint command, causing pipeline and deployment failures.

Changes:

  • Updated all GitHub Actions workflows (.github/workflows/ci.yml, .github/workflows/frontend-tests.yml) to use Node.js 20
  • Updated frontend/package.json engines field to require Node.js >=20.9.0
  • Updated lint script in frontend/package.json to use ESLint directly with modern glob patterns (eslint "**/*.{js,jsx,ts,tsx}") instead of the removed next lint command
  • Updated frontend/.node-version from 18 to 20 for Cloudflare Pages deployment compatibility
  • Updated frontend/CLOUDFLARE_PAGES.md documentation to reflect Node.js 20 requirement

Modified workflows:

  • ci.yml: test-frontend, build-frontend jobs
  • frontend-tests.yml: unit-tests, integration-tests, regression-check jobs

Modified deployment configuration:

  • .node-version: Updated to Node.js 20 for Cloudflare Pages builds

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: dcotelo <50673035+dcotelo@users.noreply.github.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Feb 9, 2026 •

Copy link
Copy Markdown

Deploying chartimpact with  Cloudflare Pages  Cloudflare Pages

Latest commit: 07b977c
Status: ✅  Deploy successful!
Preview URL: https://a6fa9b72.chartimpact.pages.dev
Branch Preview URL: https://copilot-sub-pr-104.chartimpact.pages.dev

View logs

@dcotelo

dcotelo commented Feb 9, 2026

Copy link
Copy Markdown
Owner

@copilot review this new error in the same pipelines
`Run npm run lint

chartimpact-frontend@1.5.5 lint
next lint

Invalid project directory provided, no such directory: /home/runner/work/ChartImpact/ChartImpact/frontend/lint`

Copilot AI commented Feb 9, 2026

Copy link
Copy Markdown
Contributor Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • nextjs.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update next from 15.5.10 to 16.1.5 for security Update Node.js to v20 for Next.js 16 compatibility Feb 9, 2026
Copilot AI requested a review from dcotelo February 9, 2026 15:58
@dcotelo

dcotelo commented Feb 9, 2026

Copy link
Copy Markdown
Owner

@copilot We are also facing this error in cloudflare pages

`

16:56:48.280 ▲ You are using Node.js 18.20.8. For Next.js, Node.js version ">=20.9.0" is required.
16:56:48.299 ▲ Error: Command "npm run build" exited with 1
16:56:48.556  
16:56:48.556 ⚡️ The Vercel build (npx vercel build) command failed. For more details see the Vercel logs above.
16:56:48.556 ⚡️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories.
16:56:48.556  
16:56:48.594 Failed: Error while executing user command. Exited with error code: 1
16:56:48.604 Failed: build command exited with code: 1
16:56:49.972 Failed: error occurred while running build command

`

Copilot AI and others added 2 commits February 9, 2026 16:00
Co-authored-by: dcotelo <50673035+dcotelo@users.noreply.github.com>
Co-authored-by: dcotelo <50673035+dcotelo@users.noreply.github.com>

Copilot AI commented Feb 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot review this new error in the same pipelines
`Run npm run lint

...

Fixed in commits 487296b and 084349e. Next.js 16 removed the next lint command, so I updated the lint script to use ESLint directly with a modern glob pattern: eslint "**/*.{js,jsx,ts,tsx}"

Copilot AI changed the title Update Node.js to v20 for Next.js 16 compatibility Update Node.js to v20 and fix lint command for Next.js 16 compatibility Feb 9, 2026
Co-authored-by: dcotelo <50673035+dcotelo@users.noreply.github.com>

Copilot AI commented Feb 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot We are also facing this error in cloudflare pages

`
...

Fixed in commit 07b977c. Updated the .node-version file from 18 to 20 for Cloudflare Pages. This file tells Cloudflare which Node.js version to use during builds. The next deployment should use Node.js 20 and successfully build with Next.js 16.

@sonarqubecloud

sonarqubecloud Bot commented Feb 9, 2026

Copy link
Copy Markdown

@dcotelo
dcotelo marked this pull request as ready for review February 9, 2026 16:08
@dcotelo
dcotelo merged commit b566144 into snyk-fix-8d156fcd1018c01abb3a73b896c7eb50 Feb 9, 2026
12 checks passed
dcotelo added a commit that referenced this pull request Feb 9, 2026
* fix: frontend/package.json & frontend/package-lock.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-NEXT-15105315

* Update Node.js to v20 and fix lint command for Next.js 16 compatibility (#105)

* Initial plan

* Update Node.js version to 20 for Next.js 16 compatibility

Co-authored-by: dcotelo <50673035+dcotelo@users.noreply.github.com>

* Fix lint command for Next.js 16 - use ESLint directly

Co-authored-by: dcotelo <50673035+dcotelo@users.noreply.github.com>

* Use modern glob pattern for ESLint command

Co-authored-by: dcotelo <50673035+dcotelo@users.noreply.github.com>

* Update Node.js to v20 for Cloudflare Pages deployment

Co-authored-by: dcotelo <50673035+dcotelo@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dcotelo <50673035+dcotelo@users.noreply.github.com>

* Configure Next.js 16 compatibility: Node.js 20 and TypeScript settings (#106)

* Initial plan

* Update tsconfig.json for Next.js 16 compatibility

Co-authored-by: dcotelo <50673035+dcotelo@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dcotelo <50673035+dcotelo@users.noreply.github.com>

---------

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.

2 participants