timboudreau / nb-nodejs

NodeJS support for NetBeans, originally hosted on netbeans.org
MIT License
91 stars 12 forks source link

Add libraries looks like a search but nothing happens. #26

Closed Chris2011 closed 7 years ago

Chris2011 commented 10 years ago

If I want to try "Add libraries", the dialog comes up and you see the text: "Enter search text" I removed it with the del key, now it seems that the search will stark with an empty string, I see the progressbar and "Searching for libraries..." but nothing happens. I was waiting for 1 minute or so and thought ok I will see ALL node packages but no. A seach only on type a character would be better and to see "Search for libraries with 'e'..." or so.

Regards

Chris

timboudreau commented 10 years ago

This is a duplicate of #27 in practice - Add Libraries runs npm in the background and parses the results as they arrive, but it's not finding npm.cmd as you note there.

Chris2011 commented 10 years ago

I don't think that this is a duplicate, because it doesn't matter which npm version is selected. It happens with npm and with npm.cmd.

timboudreau commented 10 years ago

I see what you're saying - you'd like all available npm libraries and then reduce the search.

I agree that would be nice, but in practice, npm never searches without doing network I/O (as far as I can tell it keeps no local cached list), and it's grown increasingly slow over time.

It might be possible to keep a local cached copy of the output, and fetch that in the background, say once a week - I'll look into doing that (it's not a trivial change). Trying to do it in real-time would mean several minutes delay before there was any output, so it's not a matter of just immediately running npm search with no search argument - it needs some infrastructure behind it.

Chris2011 commented 10 years ago

Yeah that would be a feature request for this :). I know or I think, no one will do a search for the character "e". I did it and it sucked because they found smth but the IDE hangs up, after 260 results ^^. I couldn't do anything. Maybe a pagination would be awesome, if its possible, with the cached stuff.

Chris2011 commented 10 years ago

For now, I only removed the search term, I didn't want to search for all, only testing what happens if I remove the search term and then the search started.

Chris2011 commented 7 years ago

I think with libraries I meant NPM packages. So because of this is fully natively supported in NetBeans, I will close the ticket.