Showing results for 
Show  only  | Search instead for 
Did you mean: 

App Engine JS Error | process is not defined when trying to import assert

Dynatrace Advocate
Dynatrace Advocate

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?  




Dynatrace Helper
Dynatrace Helper

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,



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, 

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.

Thank you

Featured Posts