Hi,
Thank you so much for your informations.
Best Regards
Posts made by gjoguetETP
-
RE: Import ESM module to sandboxposted in general forum
-
RE: Import ESM module to sandboxposted in general forum
Re: Import ESM module to sandbox
Hi,
Thank you very much for your clear response.
AWS has announced that it will end support for NodeJs 18, and support for Nodejs 20 will end in June 2026.
Do you think the issue will be fixed by the time support for NodeJs 20 ends on ?
Thank you.
-
Import ESM module to sandboxposted in general forum
Hello,
Following the release of nodejs 22, we have migrated all our packages to ESM.
Our JS server is used on AWS lambda, and therefore launched manually. It contains dependencies on our own packages and scripts in addition to the JsReport architecture (data/scripts/template).
We are unable to migrate our JsReport server to nodejs 22 (deployed on lambda) because:
- migrating JsReport to ESM, migrating scripts to ESM, and importing into sandbox scripts causes errors stating that import cannot be called outside the module
- leaving JsReport in CommonJS means that we either cannot perform a basic import (import .... from ‘...’) since we are in CommonJs, or we get the error “” when using await import(‘’) or await require(‘’)

To be honest, I don't know how to call ESM scripts in the JsReport sandbox.
Thank you for your help.
Best Regards.!