-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
fix: use debugger for package resolution warnings #4873
Conversation
This reverts commit 53271d3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, we can use a debug
log here?
When I've seen this print it's due to a Vite bug: #4425. I think the best solution here would be to fix that bug rather than silently drop the exception. It is causing real issues in my applications, so it's helpful to know it's happening. But if we need to silence it in the meantime I agree that |
+1 to show this with a Maybe we could use a warn once with a single short message if not debugging so people know that they may need to dig deeper. "Some packages may have incorrect...." and a pointer to use debug logs to see more |
Updated using debugger. Since it scans all the devDependencies, which could include many packages that are not intended to use that way (in the screenshots, A better solution I would think about this is that we record that error silently, and we the import analyzer actually scanned the usages with that package, and then we could warn about that there might be something wrong. For example, {
"devDependencies": {
// here we assume both packages have something wrong with their exports
"@types/node": "*",
"lodash": "*"
}
} // some-module.js
import set from 'lodash/set' Warning when scanned
|
Reverts #4822
I think the original behavior (trying to get submodule paths) is expected.
The log creates too much noise that ppl usually don't need to care about. For the debugging purpose stated in #4822, I think it's better to modify local
node_modules
when debugging.