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

TypeError: Cannot create property 'dependencies' on string '~29.2.0' #82

Open
kaiyoma opened this issue May 18, 2023 · 0 comments
Open

Comments

@kaiyoma
Copy link

kaiyoma commented May 18, 2023

For a long time, we used the original license-checker library in a simple command-line tool in our monorepo. I'm currently migrating our repo to ESM, so we can't use the original library anymore. (BTW, I'm very grateful for your fork and continued maintenance!) I tried using this library and it works correctly if I mark the dependency as "external" (for esbuild), but if I try to bundle the dependency into the final binary, I get this runtime error:

file:///C:/Users/kgetz/Work/event-viewer/packages/cv-tools/dist/index.js:21724
      var deps = obj.dependencies = obj.dependencies || {};
                                  ^

TypeError: Cannot create property 'dependencies' on string '~29.2.0'
    at findUnmet (file:///C:/Users/kgetz/Work/event-viewer/packages/cv-tools/dist/index.js:21724:35)
    at file:///C:/Users/kgetz/Work/event-viewer/packages/cv-tools/dist/index.js:21707:9
    at Array.forEach (<anonymous>)
    at resolveInheritance (file:///C:/Users/kgetz/Work/event-viewer/packages/cv-tools/dist/index.js:21706:37)
    at file:///C:/Users/kgetz/Work/event-viewer/packages/cv-tools/dist/index.js:21711:11
    at Array.forEach (<anonymous>)
    at resolveInheritance (file:///C:/Users/kgetz/Work/event-viewer/packages/cv-tools/dist/index.js:21709:37)
    at file:///C:/Users/kgetz/Work/event-viewer/packages/cv-tools/dist/index.js:21582:9
    at file:///C:/Users/kgetz/Work/event-viewer/packages/cv-tools/dist/index.js:21692:18
    at cb (file:///C:/Users/kgetz/Work/event-viewer/packages/cv-tools/dist/index.js:7249:15)

For now, I can mark the dependency as external, but figured I'd post this. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant