-
Notifications
You must be signed in to change notification settings - Fork 48
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
Error thrown while generating error message for missing asset-type #450
Comments
Huh, that's strange. I'm surprised a test didn't catch that. |
I was also surprised that TypeScript didn't flag that as an issue, but it looks like we don't have the check for that turned on. So we should probably enable noUncheckedIndexedAccess |
I was able to determine the root-cause of the original error -- but my guess is that nothing in the registry came up as a similar matching name and it returned I also noticed our bundle size grow ~15kb with the introduction of
I would try to find something smaller to replace it with, put it behind a |
Maybe fuzzysort? 5kb isn't bad if we do want to support those kind of suggestions but since we don't really have dev/prod bullds it would have to always get included. https://github.com/farzher/fuzzysort |
We likely don't need a full search library, something that computes the levenshtein distance would be enough to make a suggestion https://www.npmjs.com/package/leven |
@adierkens thanks for capturing this issue!
Action item:
|
ok i'm able to reproduce with the test case below and can confirm it's because no similar type/key name in registry fuse search will return empty array... https://www.fusejs.io/demo.html also tested in their demo page if i use any char like "8" which doesn't exist in any keys.
|
@cehan-Chloe You can use bundlephobia to check the canary version of the Player packages on your PR (similar to what was done in #432) |
Debugging an issue with assets missing from the registry, and the
fuse
search is obfuscating the real error messageThe text was updated successfully, but these errors were encountered: