Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stdavis opened this issue Jun 13, 2024 · 0 comments
Open

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

stdavis opened this issue Jun 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@stdavis
Copy link

stdavis commented Jun 13, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants