Hitting a Node.js20 error on Build request to QA #189236
Replies: 3 comments
-
|
The warning message itself contains the fix. Option 1 (Recommended): Update your actions - uses: actions/checkout@v4 # make sure it's the latest patch versionAlso check and update any other actions in your workflow that might be on Node.js 20. Option 2: Temporary workaround env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: trueNote that starting June 2nd, 2026, Node.js 20 actions will be forced to run on Node.js 24 regardless, so Option 1 is the long-term solution. |
Beta Was this translation helpful? Give feedback.
-
|
Hey @bijal-patel3-alight, This message is a deprecation warning, not a build failure. GitHub Actions is informing you that JavaScript actions currently running on Node.js 20 will soon run on Node.js 24 by default (starting June 2, 2026). In your case, the warning mentions: actions/checkout@v4 This action currently runs on Node.js 20, and GitHub is notifying users about the upcoming runtime change. How to resolve it1. Update the action to the latest version (recommended)First check if a newer version of the action supports Node.js 24. Example: - uses: actions/checkout@v4If a newer version becomes available (for example - uses: actions/checkout@v5Always check the official repo: 2. Test Node.js 24 compatibility nowIf you want to test your workflow with Node.js 24 immediately, add this environment variable to your workflow: env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: trueExample workflow snippet: jobs:
build:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- uses: actions/checkout@v4This forces JavaScript actions to run on Node.js 24 so you can verify your pipeline works before the cutoff date. 3. Temporary fallback (not recommended)If something breaks after the migration, GitHub allows a temporary opt-out: env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: trueHowever this should only be used temporarily while updating dependencies. Summary• This is only a warning, not an error. Checking and updating your GitHub Actions periodically will prevent issues when the runtime switch happens in June 2026. |
Beta Was this translation helpful? Give feedback.
-
|
How to Resolve Example workflow fix: yaml
yaml
yaml Fall 2026: Node.js 20 will be completely removed from runners. Until then, you can temporarily opt out of Node.js 24 if needed by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true, but updating the action is the recommended solution. The simplest fix is to ensure your actions/checkout version is up-to-date. The warning is a helpful reminder to keep your workflows current with the runner environment. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Trying to sync decode files and do a build on GitHub. However getting error below and not sure how to fix it. Can someone please guide me?
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions