Sometimes these problems rise because of some differences between CJS and ESM when it comes to use .mjs -- see the difference from here:
nodejs.org/docs/latest/api/esm.html
People still shy from the .mjs and they use babel or typescript to get interoperability between the two types of modules.
I think it's the future, but, for now, they use the .js and allow for ESM in their code base in whatever method is available.
Dean Tarisai
Software developer
Awesome post! But what causes an error to rise when I try to use an .mjs file inside of a js file ? Are they limits to interoperability of module formats ?