Answer the question
In order to leave comments, you need to log in
How to disable import of .mjs modules?
Hey!
I have a script that imports a library
. The infer library in turn imports another library:
And here is the problem with it:
When building, I get an error:import infer from 'tern/lib/infer'
require("acorn-loose")
ERROR in ./node_modules/acorn-loose/dist/acorn-loose.mjs 28:13-17
Can't import the named export 'Node' from non EcmaScript module (only default export is available)
{
...
"main": "dist/acorn-loose.js",
"module": "dist/acorn-loose.mjs",
...
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question