-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Ignore "//" key in (dev)depedencies #440
Comments
Knip should definitely handle this error better and more user-friendly. But this could indicate that there's a |
Looks like it: in
Anything I can do to work around that? |
Sorry, I was talking about only the |
I misunderstood "in one of the (dev) dependencies" then. We don't use workspaces.
Can |
Is it expected that it doesn't say "Reading workspace configuration(s)" with |
Nah, that's not the issue, there's something off in It's happening here, maybe it's a bug in this dependency (not expecting you to read or debug this btw):
Yes, the default mode, |
Ok, I've found the issue. We use the officially recommended workaround for "comments" in package.json: the |
Ah, gotcha. Yeah, that would be an issue for the |
It turns out the problem is only an array in |
And thank you for quick responses, by the way! |
Their response is that this key isn't supported in pnpm (or npm), so it isn't a bug on their side. I don't know if you can easily work around this or add an option to use corresponding yarn packages. But as I said, I have a workaround, so will try to actually use Knip next week. |
I'm happy to look into it, but first I'd need a reproducible case. |
https://github.com/alexeyr-ci/knip-issue-reproduction. Simply running |
Sounds to me like Zoltan says npm and pnpm do not support this:
Even if Yarn supports it, there's still not much I can do here, as indeed, I'm using Guess the only solution would be to re-implement this package, but I'm not sure if it's worth the hassle. What version of Yarn are you using? Since support for Yarn v1 is not a priority. |
Oops, sorry, you are right, I just missed a "not" while writing (plus another typo). I think re-implementing definitely isn't worth it, and yes, it's Yarn 1. But a simple workaround I thought of: either in
before passing it to So far as I can see it should be safe and not cause any other problems; this can never be a real dependency, after all. But maybe I'm overlooking something? |
Also |
When I run knip 3.13.0 on my project, I get
This happens both without a config file and with
knip.js
containingwhich is my planned configuration.
Unfortunately, I can't share the project, but can test any attempted fix.
The text was updated successfully, but these errors were encountered: