mssql and ES Modules on jsreportonline
-
I assume jsreportonline is still limited to CommonJS (
require()) and doesn't support ESM (import)?I've been using
mssql@11for the past couple of years without any issues, but it looks like two of its dependencies,tediousanduuid, have moved to ESM-only, which ended up breaking things. I had to downgrade to a much older version ofmssqlto get things working again.I came across this thread mentioning that ESM support was potentially planned for June 2026. Is that still on the roadmap, and if so, is there an updated timeline for when it might be available?
-
This post is deleted!
-
Yes, we have noticed the same issue with mssql last week, and you have found the same solution as us.
The other workaround was to publish to npm a mssql fork with downgraded dependencies.The jsreport support for the ESM modules in scripts/helpers depends on the nodejs support in the VM module.
There are some updates in nodejs we want to check just as our next current task. Likely next week.
We will update here https://github.com/jsreport/jsreport/issues/937We understand this is becoming critical as more packages are limiting CommonJS support.