license-checker-rseidelsohn icon indicating copy to clipboard operation
license-checker-rseidelsohn copied to clipboard

Workspaces support

Open GMaiolo opened this issue 2 years ago • 10 comments

Been trying to get this to work with a monorepo with workspaces and it's impossible to use the --production flag as it yields empty results. It's also not possible to navigate to each project and run the license-checker as the node_modules folder is empty in these directories.

In such environments, each workspace has its own package.json but the node_modules is located on the root and shared between these workspaces.

Does anyone know if a workaround is possible with this setup?

GMaiolo avatar Feb 25 '22 13:02 GMaiolo

What's the point of the --production flag anyways? Do you realize that this usually gives you a lot of false positive licenses that are not included in your build output and thus not distributed? Do you understand why this also might give you a few false negatives, missing the licenses of packages that you are distributing?

codepunkt avatar Sep 21 '22 06:09 codepunkt

What's the point of the --production flag anyways? Do you realize that this usually gives you a lot of false positive licenses that are not included in your build output and thus not distributed? Do you understand why this also might give you a few false negatives, missing the licenses of packages that you are distributing?

@codepunkt Are you asking what the production flag's point is in my specific scenario or in the library as a whole? I don't remember what I was trying out at that time (it's been a few months), but I assume I wanted to ignore all internal tooling security issues.

Disregarding the production flag discussion, workspace checks still yield incomplete results.

GMaiolo avatar Sep 21 '22 14:09 GMaiolo

@GMaiolo Are the packages/workspaces in your monorepo being built with webpack, rollup or other bundlers?

codepunkt avatar Sep 22 '22 06:09 codepunkt