Skip to content
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

npm refresh hangs on refresh #398

Closed
MarkAurit opened this issue Aug 28, 2015 · 7 comments
Closed

npm refresh hangs on refresh #398

MarkAurit opened this issue Aug 28, 2015 · 7 comments
Assignees

Comments

@MarkAurit
Copy link

windows 7/64 bit/8G
vs 2013 professional
Ive just created a small 'blank console' project and added express using the npm manager express. After adding it I noticed there was a red message that the catalog of packages was old, so I hit refresh, and it just hangs on the 'loading published package list' dialog. After a few minutes, if I close it, and then choose the "install new package" option, I just get the same dialog. If I let it go for a total of maybe 5-7 minutes I get a "refresh failed - see output below for details", although there is no output that I can tell.
nothing in C:\Users\AppData\Local\Microsoft\Node.js Tools\NpmCache looked helpful
SOLVED: closed the project, shutdown vs, opened vs and the project. Now I get the original
screen when adding a package (including the "updated more than 1 month ago" message,
which apparently I need to ignore).

@jamesxv7
Copy link

jamesxv7 commented Sep 7, 2015

I am experiencing the same issue but using VS2015 on Win8. There is a workaround mentioned by @mousetraps in another issue that worked for me but temporarily. It turns out that as soon I erase the cache in *%localappdata%\Microsoft\Node.js Tools* and click again on Refresh, the window remains Loading published package list... / Download completed - updating database eternally. My output log is:

Registry url: https://registry.npmjs.org/
Current Time: 9/6/2015 10:14:41 PM
Last Refreshed: 9/6/2015 8:51:53 PM
Number of Results: 192835
Registry url: https://registry.npmjs.org/
Path to npm: C:\Program Files\nodejs\npm.cmd
Downloading package cache to C:\Users\Jaime\AppData\Local\Microsoft\Node.js Tools\NpmCache\1d79c43a-7038-4e54-ac6a-881485af293c\since_packages.json
Downloading list of packages from https://registry.npmjs.org/-/all/since?stale=update_after&startkey=1441586403199
Download complete - updating database
Reading 593255 bytes from C:\Users\Jaime\AppData\Local\Microsoft\Node.js Tools\NpmCache\1d79c43a-7038-4e54-ac6a-881485af293c\since_packages.json (9/6/2015 10:14:57 PM)

@mousetraps - Any other information that you need just let me know.

@billti
Copy link
Member

billti commented Sep 8, 2015

I believe this is the issue I've found and started fixing as discussed in #415 (comment) and the next couple of comments. I hope to have a full fix for this in shortly.

@jamesxv7
Copy link

jamesxv7 commented Sep 8, 2015

@billti Thanks a lot for the feedback. @MarkAurit since root cause were covered in details on issue #415 this issue should considered closed. What do you think @billti?

@billti billti added this to the September milestone Sep 9, 2015
@billti billti self-assigned this Sep 9, 2015
@billti
Copy link
Member

billti commented Sep 9, 2015

Actually, looks like #415 had another root cause, which we seem to have found. I'll keep this issue open for tracking the NPM refresh issue.

billti added a commit that referenced this issue Sep 10, 2015
NPM catalog schema change causes high CPU (#398)
@billti
Copy link
Member

billti commented Sep 10, 2015

This is merged into master now.

@billti
Copy link
Member

billti commented Sep 11, 2015

@MarkAurit @jamesxv7 We just pushed a new release with this fix. See https://github.com/Microsoft/nodejstools/releases if you'd like to check it out. Thanks!

@Vandyke-IT-Solutions
Copy link

@billti
I had the same problem and can confirm that the new release fixes the problem. Thanx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants