Skip to main content
Node 12 exposes the following npm modules as globals in Rules, Custom Database scripts, and Custom Social Connection scripts, so you can use them without calling require. Node 16 and later remove them. Before you use one of these modules, explicitly require it:
  • In Rules, Custom Database scripts, and Custom Social Connection scripts, require a version listed as available for your runtime.
  • In Hooks and Actions, add the intended version as an explicit dependency first.

Replace magic globals

  1. Find every use of a magic global in your Rules, Custom Database scripts, and Custom Social Connection scripts.
  2. Add an explicit require for each one, using a version listed in Can I require for the target runtime.
  3. Test in a development tenant before you change the tenant-wide runtime.
To learn more, read npm Modules, Can I Require, and Migrate from Node 12 to Node 22.