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

Some packages not included (e.g. ramda) #1092

Open
abianche opened this issue Nov 17, 2024 · 3 comments
Open

Some packages not included (e.g. ramda) #1092

abianche opened this issue Nov 17, 2024 · 3 comments
Labels

Comments

@abianche
Copy link

Hi,

I can't seem to understand why some packages are not included in the generated json.

In a specific case, I am using ramda, which I have as prod dependency, and to actually include it I had to specify it in the configuration:
includePackages: () => ["node_modules/ramda"]

Actually, by adding all my prod dependencies into the includePackages property (automatically read from my package.json) I can see that I am missing on 10 licenses.

Why is that? What's the criteria for excluding those licenses?
Thanks!

@codepunkt
Copy link
Owner

Hey Alessio!

Can you provide me with a reproducing example?

@abianche
Copy link
Author

abianche commented Nov 17, 2024

Hey!

For the reproduction, I created a new Next.js project, and just added Ramda dependency: https://github.com/abianche/wlp-issue-1092.

Just execute npm install and npm run build, then you will find the licenses output in .next/oss-licenses.json.
In next.config.ts you can see the webpack configuration where the LicensePlugin is added. I also included my workaround with the includePackages (commented out).

With the default configuration I get this output (5 licenses):
oss-licenses.json

With my workaround I get this (6 licenses, incl. Ramda):
oss-licenses.json

If you need it, I can also update it with all the dependencies I am using in my other project, as ther are more missing there.

Thanks for checking this out!

GitHub
Contribute to abianche/wlp-issue-1092 development by creating an account on GitHub.

@codepunkt
Copy link
Owner

Next.js is pretty complex to setup, because it offers a mixture of static site generation, server side rendering and client-side hydration. Which package licenses are you interested in? Those running on the server, or those being sent into your users browsers?

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

No branches or pull requests

2 participants