Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable "npm install" in VS2015

In VS2015, opening a web project/solution that uses node packages (e.g. gulpfile.js) will cause VS to automatically run "npm install" and install all the packages. VS2015 comes with an old version of npm (1.4.19), which doesn't do a "flat" install of package dependencies, which causes paths to get created that are over 260 characters. This is really painful when it happens every time Visual Studio is opened. I've found several workarounds (including http://jameschambers.com/2015/09/upgrading-npm-in-visual-studio-2015/), but ideally there would be a setting somewhere to disable "auto npm install" or something like that, I just either can't find the setting or it doesn't exist.

like image 825
themilkyninja Avatar asked Nov 09 '22 22:11

themilkyninja


1 Answers

You can literally "hide" all web tools from Visual Studio:

  1. Under Tools menu select "Options..."
  2. Go to "Projects and Solutions" -> "External Web Tools"
  3. If you want to make Visual Studio use your globally installed npm - just remove checkboxes from all items starting with $(DevEnvDir).
  4. If you want to completely disable all web tools in VS: uncheck all.
like image 85
yrtimiD Avatar answered Nov 15 '22 10:11

yrtimiD