-
Notifications
You must be signed in to change notification settings - Fork 362
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
Rerunning projen cannot proceed due to existing license. #3533
Comments
Thanks for reporting. We'll need your project type and config. |
You can probably fix this by removing your LICENSE file manually. |
Hi, that was my first attempt... no luck. I have tried quite a few more tricks to narrow down the scope of the problem... no luck. Re: project type (easy enough) and config, do you want the whole projenrc.ts? |
As much as you can share. I'll just need to reproduce the issue somehow. |
This is a recently adopted project on my half, so not entirely sure for the reasoning behind this approach we are using, but I have narrowed it down to some custom license generation code: export const licenseFile = (project: Project) => {
project.tryRemoveFile("LICENSE");
new TextFile(project, "LICENSE", { lines: getLongLicense() }); // line 3
}; Since we are running a monorepo with multiple projects, the license files were wanted to be added in many places. (ie Created a repo which demonstrates the above. Thanks in advance! |
Thanks for the reproduction! I'll have a look.
My best guess is that you are using a custom/customized license (as in a license text that is not supported by projen). |
It is simply plain text, I am unsure how it could be unsupported. Anyhow thanks for looking, keen to hear your feedback. :) |
Hi, were you able to reproduce this issue? Thanks in advance. |
Yes, apologies. Here's what's happening:
To fix this, you need to tell PDK to not add licenses: const monorepo = new MonorepoTsProject({
// other options
licenseOptions: {
disableDefaultLicenses: true,
},
}); This is not really a bug in projen, but the error could be much better. |
Unfortunately we are stuck in an upgrade loop, and we need the latest version of pdk to fix this (licenseOptions does not exist...) Referencing that upgrade issue here: aws/aws-pdk#784 |
Projen can no longer synth. Issue surfaced when upgrading from
0.79.24
to0.81.0
.Error is:
Error: There is already a file under LICENSE
(projen/src/file.ts
Line 112 in 9eb1e59
I looked through code changes since .79.24 but to no avail, sorry.
Macos, node v21.2.0
The text was updated successfully, but these errors were encountered: