How to import xml2js in an Evaluate Flow block

Though asked, it has never been answered.
Can you do an import/require in an Evaluate Flow block to use xml2js?

In a post-response script, I can use
const xml2js = require(‘xml2js’);

In the Evaluate block it errors. I’ve tried
let xml2js = import(‘xml2js’);

but that does not seem to work. There is no error, but once I reference xml2js.parseString, there is an error about the function.

import and require are not supported today in evaluate blocks. We’re considering this for the future.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.