Repository navigation
ERR_UNSUPPORTED_DIR_IMPORT has hard to parse Grammar #40973
Description
Version
Platform
Linux bgolding 5.11.0-40-generic #44~20.04.2-Ubuntu SMP Tue Oct 26 18:07:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
esm/resolve
What steps will reproduce the bug?
Trigger the ERR_UNSUPPORTED_DIR_IMPORT error
How often does it reproduce? Is there a required condition?
100% iff you trigger this error
What is the expected behavior?
A grammatically comprehensible sentence.
Possibly:
Directory import '/home/bgolding/Desktop/test/node_modules/@angular/compiler-cli/ngcc' is not supported, resolving ES modules imported from /home/bgolding/Desktop/test/testing/node_modules/ng-packagr/lib/utils/ng-compiler-cli.js
Assuming this error means that:
- It is not possible to import a directory, but
- It is possible to import
/home/bgolding/Desktop/test/testing/node_modules/ng-packagr/lib/utils/ng-compiler-cli.jsas an alternative to that directory
Alternatively:
Directory import '/home/bgolding/Desktop/test/node_modules/@angular/compiler-cli/ngcc' is not supported while resolving ES modules imported from /home/bgolding/Desktop/test/testing/node_modules/ng-packagr/lib/utils/ng-compiler-cli.js
If this error means that:
- It is not possible to import a directory, AND
- It was trying to resolve an import from
/home/bgolding/Desktop/test/testing/node_modules/ng-packagr/lib/utils/ng-compiler-cli.js
What do you see instead?
Directory import '/home/bgolding/Desktop/test/node_modules/@angular/compiler-cli/ngcc' is not supported resolving ES modules imported from /home/bgolding/Desktop/test/testing/node_modules/ng-packagr/lib/utils/ng-compiler-cli.js
Additional information
Lines 1578 to 1579 in 27b1088
| E('ERR_UNSUPPORTED_DIR_IMPORT', "Directory import '%s' is not supported " + | |
| 'resolving ES modules imported from %s', Error); |
https://stackoverflow.com/questions/64449464/error-err-unsupported-dir-import-directory-import-when-attempting-to-start-no
Activity
Trott commentedon Nov 26, 2021
@nodejs/modules
guybedford commentedon Nov 26, 2021
Thanks for sharing the case here @bgolding355, the clearer we can make this the better. At least the fix was at least relatively clear despite the wording.
I think
resolving ES modulewithout the plural is the direct grammar fix.Perhaps we can make a rewording along the lines of
is not supported by the ES module resolver imported fromor similar.github-actions commentedon Jun 25, 2026
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
github-actions commentedon Jul 26, 2026
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.