Closed mpetuska closed 2 years ago
Interesting. That error is coming from here: https://github.com/mhassan1/yarn-plugin-licenses/blob/4989eb27f5724df26d84f09756b2b16665dd5358/src/utils.ts#L191-L197
My guess is it is not handling the case where one of the dependencies has licenses
as a string. Even though that is not a valid configuration, we should handle it. Can you share a yarn.lock
file so I can try to replicate?
I can't unfortunately as it's an enterprise project. But here are some key points of our setup:
I've just pushed up a branch that I believe will fix the issue. Can you run yarn plugin import https://raw.githubusercontent.com/mhassan1/yarn-plugin-licenses/consider-string-licenses/bundles/@yarnpkg/plugin-licenses.js
and try again?
I can confirm that it works, thanks. Can you hold off closing this issue until the fix is merged into master, please?
Merged and released as v0.7.2
When trying to list licenses recursively, the following error is thrown.
Environment: