Skip to content

ERR_UNSUPPORTED_DIR_IMPORT has hard to parse Grammar #40973

Open
@bgolding355

Description

Version

27b1088

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:

  1. It is not possible to import a directory, but
  2. It is possible to import /home/bgolding/Desktop/test/testing/node_modules/ng-packagr/lib/utils/ng-compiler-cli.js as 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:

  1. It is not possible to import a directory, AND
  2. 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

node/lib/internal/errors.js

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

Metadata

Assignees

No one assigned

    Labels

    errorsIssues and PRs related to JavaScript errors originated in Node.js core.esmIssues and PRs related to the ECMAScript Modules implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions