


Open a command prompt scoped to your project folder and run npm init to initialise npm in your project, this will ask you for some basic details about your project but you can just accept the defaults and edit the values later in the configuration if you’d like. Preparationįirst off, install Node.js which will install npm for you.Īs per this article it’s easier to use npm from the command line and installing the extension “Open Command Line” means you can open a command prompt scoped to any folder in your solution from a right click. Using npm in Visual Studio takes a bit more work than Bower to setup but is better supported and gives more control over the library files that are published.

By default new Web Applications created in Visual Studio 2017 use Bower for managing external libraries such as jQuery and Bootstrap, however Bower is no longer best practice (and seemed a bit flaky in Visual Studio anyway) and so for new projects I now use npm for managing packages.
