Open aladdin-add opened 2 years ago
can it be resolved?
The root of this looks to be the use import()
(not necessarily importing ESM) from a VM https://github.com/nodejs/node/issues/35889 - this has been buggy in Node at least until https://github.com/nodejs/node/pull/48510.
At a minimum, it looks like v8-compile-cache
needs to implement importModuleDynamically
when calling vm.Script
but that API looks pretty unstable in recent Node releases, and:
We do not recommend using it in a production environment.
Repro for experimenting with this: https://github.com/robhogan/v8-compile-cache-issue
At a minimum, it looks like
v8-compile-cache
needs to implementimportModuleDynamically
when callingvm.Script
but that API looks pretty unstable in recent Node releases, and:
There is an open PR with a fix using importModuleDynamically
: https://github.com/zertosh/v8-compile-cache/pull/47
If not, can you support ignoring esm?
Tried it and got: TypeError: Invalid host defined options