Node function block to support require

Hi there,
would it be possible to add the ability to load external modules via require?
It will also be useful to have the FS module via require.
Cheers.

The Function Node in Edge Workflows do support loading third-party modules via require. All of the built-in modules, including fs, are available.

One thing to remember is that the Function Node is synchronous, so you must use the synchronous version of functions. The fs module, for example, has the Synchronous API.

For Application and Experience Workflows, the challenge with require is that those Function Nodes run within our cloud infrastructure. Running arbitrary code is difficult from a security perspective, which is why the Function Node is so restricted for those workflow types. For Edge Workflows, the function is running on your hardware, so the restrictions have been removed.

1 Like