nodejs v18.3.0 Error: Rewiremock: there is no "parent module". Is there two HotModuleReplacementPlugins?
Kreijstal opened this issue · 4 comments
Kreijstal commented
can I use rewiremock in native node?
await import("rewiremock"); in the repl throws the error in the title. I am not using any transpiler, simply using native node repl
theKashey commented
Probably this is due ESM becoming the "native" mode.
I need to check if rewiremock can exists in the new world (it is not native ESM compatible)
KristjanTammekivi commented
Have you had an opportunity to check this out yet?
theKashey commented
Well, yes. It's not native module compatible as it missing a part("loader") required to modify ESM behaviour and make them mockable. Basically, the requirement is to implement an old module system inside new module system.
Not something I can afford doing 😢