TypeError: Cannot create property 'dependencies' on string '~29.2.0'
Opened this issue · 0 comments
kaiyoma commented
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!