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

The cache command is not cleaning up stale license files #603

Open
meenie opened this issue Jan 3, 2023 · 2 comments
Open

The cache command is not cleaning up stale license files #603

meenie opened this issue Jan 3, 2023 · 2 comments

Comments

@meenie
Copy link

meenie commented Jan 3, 2023

When running bin/licensed cache, it is not cleaning up stale license files. For example, we recently updated @rails/webpacker to a newer version that not longer relies on node-sass. After doing so and observing that node-sass is no longer inside of our yarn.lock file, running the cache command does not delete the node-sass license file.

We do have multiple apps configured in our .licensed.yml file as we have a monorepo, could it be that?

@meenie meenie changed the title The cached command is not cleaning up stale license files The cache command is not cleaning up stale license files Jan 3, 2023
@jonabc
Copy link
Contributor

jonabc commented Jan 4, 2023

@meenie 👋 are you able to provide either a minimal project to reproduce the issue, or at a minimum your licensed configuration file, package.json and yarn.lock files, and the version of yarn you're using? I don't have a clear idea of what's going wrong based on the issue description alone 😞

@meenie
Copy link
Author

meenie commented Jul 13, 2023

@jonabc, sorry for not getting back to you. I figured out why it's not deleting files. When you run bin/licensed cache and you have yarn dependencies, you are gonna have a bad time :). Especially on Ubuntu when you don't need the fsevents library because it's usually set to optional. As you pointed out in another issue, yarn sucks at listing what deps are installed as it reports optional deps as installed when they are not. So there are errors at the end which means it doesn't do the cleanup. Good times!

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

No branches or pull requests

2 participants