Skip to content

JSII Breaks on non SPDX License #1775

@henrysachs

Description

@henrysachs

Describe the bug

Hi there,

I was trying to set a custom License in my package.json like this: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#license

Expected Behavior

The best for me would be to set non-SPDX licenses like "LicenseRef-MyCoolLicense" as spdx describes here: https://spdx.github.io/spdx-spec/v2-draft/SPDX-license-expressions/

Current Behavior

[ERROR] Invalid license identifier "SEE LICENSE IN LICENSE", see valid license identifiers at https://spdx.org/licenses/

Reproduction Steps

create a cdk construct library via projen
set the license like

project.package.addField('license', 'SEE LICENSE IN LICENSE');

run the build command

Possible Solution

No response

Additional Information/Context

No response

SDK version used

5.4.0

Environment details (OS name and version, etc.)

MacOs 15.3

Kind Regards

Henry

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions