Hello,
I'm using Node 14 and all of my project is managed as a module ("type": "module" in package.json).
Until now, using everywhere imports and exports, I didn't see this error.
Lately I added a dynamic import to some new code like the following:
if(process.env.USE_NEW_CODE) {
const { RunNewCode } = await import("./controllers/new/code.js");
RunNewCode();
}
Suddenly I got 'import()' expressions are not supported yet error.
I have ecmaVersion field set to 2021,
and "engines": { "node": ">=14.5.0" }
According to the README of this rule, it should be enough
Node 14 fully supports ESM
Thanks in advance!
Hello,
I'm using Node 14 and all of my project is managed as a module (
"type": "module"in package.json).Until now, using everywhere imports and exports, I didn't see this error.
Lately I added a dynamic import to some new code like the following:
Suddenly I got
'import()' expressions are not supported yeterror.I have
ecmaVersionfield set to 2021,and
"engines": { "node": ">=14.5.0" }According to the README of this rule, it should be enough
Node 14 fully supports ESM
Thanks in advance!