Skip to content

Error possibily related to bundling of import.meta.url #1200

Open
@stdavis

Description

@stdavis

I'm having strange path resolution issues with import.meta.url after it's built. I have created a simple project to reproduce the issue: https://github.com/stdavis/repros/tree/main/ncc-import-meta-url

It runs without errors before it is built. But after, I get the following error message:

node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^

[Error: ENOTDIR: not a directory, open '/Users/***/Documents/working/repros/ncc-import-meta-url/dist/bf1263f1cc68120f8f8a.js/templates/template.hbs'] {
  errno: -20,
  code: 'ENOTDIR',
  syscall: 'open',
  path: '/Users/***/Documents/working/repros/ncc-import-meta-url/dist/bf1263f1cc68120f8f8a.js/templates/template.hbs'
}

Node.js v20.10.0

I believe that it has something to do with this code in conventional-changelog-angular. After it is built, dirname is a path to the built file, not the directory in which the module resides.

Any help would be greatly appreciated. Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions