07 Feb 2024 03:50 PM
I am trying to import and use assert in my. When I import assert I get the error shown in the screanshot below. I tried installing 'process' but still didn't fix it. Is there a way to fix this problem?
Solved! Go to Solution.
08 Feb 2024 03:47 PM
Hi @Abdelwahab,
Can you elaborate on where you're trying to import assert? It's available as built-in module, and you'll need to utilize an app function to use any of them since they're not available in the frontend. Out of curiosity, what is your use case for assert?
Kind regards,
Sarah
08 Feb 2024 04:45 PM
Hi @SarahFaustmann, I wanted to import it in the frontend is there a way to polyfill the process? I am trying to build a converter that converts selenium-based tests to DT assert is often used with selenium. I know that I can run it on an App function but I wanted to know how to polyfill in DT apps setup
Thank you,
Abdelwahab
13 Feb 2024 10:56 AM - edited 13 Feb 2024 12:47 PM
Hi @Abdelwahab, the process module is unavailable in the frontend because it's tied to the Node.js runtime. Unfortunately in your case, the only way to use it in app development would be through an app function. Polyfilling the module is also impossible because it is deeply tied to the Node.js runtime and can't be emulated using JavaScript, like certain other Node.js features.