How to import FakerJs 8.x in a pre-request script

I happened across this post today & tried using it in Postman 11.10.1 (Windows 11):

However, it doesn’t work – rather, it throws the following error:

Error loading external library:
{type: "Error", name: "SyntaxError", message: "Function statements require a function name"}

On the following line of code:

const fakerModule = await import(`data:text/javascript;base64,${btoa(text)}`);

I’m not a JS guru… is that something that can be solved by changing the code described in the previous forum post?

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