-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
TypeError: Cannot read properties of undefined (reading 'kind') #725
Comments
Unfortunately it does not, all I can say is that most likely the issue is related to an import call (
Please see https://knip.dev/reference/known-issues#the-cjs-build-of-vites-node-api-is-deprecated |
I guess the only way to find the source of the problem will be to continously divide my code base down until only the offending line remains, but I'm not motivated to do that as this is a 50k LOC repo. If something could be done to indicate the location of the offending line, it'd be appreciated. |
In this file:
Add this line before the one that has
Then run |
You can also try to e.g. |
Encountered the same issue while tying out knip on our project. I am getting it on the expression of the following type
It seems that in this case calculating the element based on the index goes wrong, because for on of them element becomes undefined. Hopefully this helps a bit |
Ah, that makes sense. I'd guess e.g. |
Should be fixed in v5.27.0, let me know if it isn't. |
Yes, |
When using Promise.all to import multiple modules and then destructuring the result array with ignored values, the issue persists in version 5.27.0. Here is an example code snippet illustrating the problem:
|
🚀 This issue has been resolved in v5.27.1. See Release 5.27.1 for release notes. Using Knip in a commercial project? Please consider becoming a sponsor. |
Running against a vite typescript project, I'm hit with this error. Maybe the stack trace will help identify the bug. Also the CJS vite error seems odd, the project is pure ESM.
The text was updated successfully, but these errors were encountered: