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 install crashes Visual Studio 2015 RTM #968

Closed
cveld opened this issue Oct 4, 2015 · 7 comments
Closed

Npm install crashes Visual Studio 2015 RTM #968

cveld opened this issue Oct 4, 2015 · 7 comments

Comments

@cveld
Copy link

cveld commented Oct 4, 2015

I have copied some fragments to my gulpfile.js and I try to add the required packages to package.json. But every time I hit the save button, and npm install kicks off, this crashes Visual Studio. How can I troubleshoot this further?

@Eilon
Copy link
Member

Eilon commented Oct 5, 2015

@barrytang

@barrytang
Copy link

@vkichline, can you see if you can repro?

@mmulvogue-work
Copy link

Number of devs in our team are also experiencing this issue.
Seems to be path length related...

@Mark-Broadhurst-Spin
Copy link

Its also affecting a member on my team we have narrowed it down to on start up it seems to try and restore packages using npm install this succeeds however what ever happens next kills visual studio.

@mmulvogue-work
Copy link

We seem to have found a fix - at least for the project we're working on.
After a bit of trouble shooting I'm now very sure the problem we were experiencing was path length related.

We could run npm install in command prompt with Visual Studio running in background and Visual Studio would just suddenly crash, we then couldn't start Visual Studio until the node_modules folder was deleted.

The fix for us was:

  • Delete the offending node_modules folder within the project dir
  • Upgrade global npm to latest version (was v3.3.8 for us) either with npm install npm -g or opening cmd prompt @ %programfiles%\nodejs and running npm install npm@latest
  • In Visual Studio -> Options -> Projects and Solutions -> External Web Tools : un-select the two paths starting with $(DevEndDir)
  • now back in project dir run npm install which should result in a much shallower node_modules directory tree

There was a lot of faces in palms when we discovered this.... :)

@Mark-Broadhurst
Copy link

We also have found a slightly different work around, it seems like it only happens when using npm with git. so adding the node_modules folder to .gitignore resolved our problem here.

It seems the visual studio git library doesn't like when it suddenly gets 70,000+ files added.

@aspnet-hello
Copy link

This issue is being closed because it has not been updated in 3 months.

We apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate.

@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants