NPM package search is hit-and-miss - possibly due to some sort of debouncing bug

Sometimes the search results get messed up. It might have to do with some sort of debouncing thing:

Try pausing half-way though typing and typing really fast, and that sort of thing. It happens randomly for me - maybe 10% of the time.

Might have been the original cause of this person’s problem:

Thanks for reporting this. I can reproduce this matching your typing in the video. I’ve flagged it to the team and they’ll look into fixing it up.

1 Like

I’m sure the team has worked out what the problem is here and is just busy doing other stuff, but just in case: The problem is that it queues the requests at each keystroke rather than cancelling the old ones and starting again.


Slightly longer debouncing delay + cancelling/ignoring old requests = fixed, I think.


Thanks, Joe! We’ll add that to the list :slight_smile:


Hi Joe. We’ve fixed this (by debouncing search requests, as you suggested). Thanks again for reporting!