Node.js
Node.js ES module directory import is unsupported
Node's ES module resolver does not automatically load a directory index for a relative import. Code that worked with CommonJS folder resolution can fail after switching to import syntax.
Node.js
Node's ES module resolver does not automatically load a directory index for a relative import. Code that worked with CommonJS folder resolution can fail after switching to import syntax.
Observed message
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import is not supported resolving ES modules
Why it happens
How to fix it
Official reference
Node.js Docs: ERR_UNSUPPORTED_DIR_IMPORTRelated errors
Explore more