License "UNLICENSED" is not a valid SPDX expression!
flyon opened this issue · 4 comments
ERROR in WebpackLicensePlugin: License "UNLICENSED" is not a valid SPDX expression!
I have several proprietary / private packages on npm. I have denoted them as licence: "UNLICENSED"
in package.json, as from what I understand that would be the right term.
But why is this throwing an error then?
See #460 (comment) for a possible solution.
I have several proprietary / private packages on npm. I have denoted them as
licence: "UNLICENSED"
in package.json, as from what I understand that would be the right term.
That is a commonly used term to denote private packages without a license.
But why is this throwing an error then?
You usually generate open source licensing information (and thus use this plugin) because you want to distribute the build result of an application or service that is using these open source packages to a third party. If you have UNLICENSED
packages as part of the open source you use, most third parties will not be able to use your package at all.
Aside from that, your proprietary/private packages (that I assume you or your company have authored themselves) are not open source, but are part of the thing you distribute without being open source. My suggestion is to reserve a NPM namespace for your internal UNLICENSED
packages that you're using and then exclude these packages from the license metadata generation using the excludedPackageTest
option like this:
excludedPackageTest: (packageName, version) => {
return packageName.startsWith('@internal/')
}
If you have UNLICENSED packages as part of the open source you use, most third parties will not be able to use your package at all.
Commercially distributed software still needs a manifest of licensing information for any open source packages it relies on. Proprietary packages are typically marked as 'private' in package.json
- shouldn't those be excluded by default?