How can I disable NPM package restore in Visual Studio 2015?

前端 未结 3 763
猫巷女王i
猫巷女王i 2020-12-24 04:17

When I open a project with a package.json in Visual Studio 2015, an npm install is automatically started, and VS is unresponsive until the install is completed.

I wo

3条回答
  •  离开以前
    2020-12-24 04:59

    Try this:

    • Open Tools -> Options
    • Select Projects and Solutions / External Web Tools
    • Uncheck all four paths
    • Click OK

    It doesn't seem that closing the solution, etc., is necessary. NPM and Bower functionality are now disabled in VS but will work fine on the command line (assuming you've globally installed npm, bower, etc.) You may get some error messages in the Output window, but no build errors or warnings.

    To restore normal operation, go back to External Web Tools and click "Reset to Defaults" in the lower right.
    I haven't tried this with Publish -- you might have to restore defaults to successfully publish, try it if you encounter errors at that point.

提交回复
热议问题