Action Fails When Executed after upgrading to Node 18 or Node 22 Runtime

Overview

When an Action is created using Node 18 or Node 22 as the runtime version, the Action fails upon execution. This article addresses the cause of this failure.

Applies To

  • Actions
  • Node 18 Runtime
  • Node 22 Runtime

Cause

Node18 became available as an Action runtime in July 2023.

A significant breaking change is that, going forward, built-in libraries will no longer be supported.
Any attempt to run Actions without declaring the library and its version in the Dependencies block will fail. 

This is briefly mentioned in the "Magic npm Modules" documentation.

Solution

  1. Select Node 18 or Node 22 as the runtime for Actions.

  2. Declare the use of any library and the specific version in the Dependencies block.

NOTE: This usage style applies to any dependencies required in the Action, such as the Axios library.



Screenshot 2023-07-25 at 19.41.17.png

Related References

Recommended content

No recommended content found...