spaceagestereo
spaceagestereo

Reputation: 554

Visual Studio 2015 Node.js tools npm version

I would like to use the latest npm within Visual Studio 2015. I've installed Joyent Node from the Visual Studio installer. I understand one can install Node.js seperately but we seem to have issues with that so we are trying to do things the "Microsoft Way". I have also installed the Node.js Tools 1.1 for Visual Studio 2015. Within the node.js interactive window within Visual Studio, running .npm gives me the following:

Specify configs in the ini-formatted file:
    C:\Users\MyUsername\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
[email protected] C:\Program Files (x86)\nodejs\node_modules\npm
 successfully completed

However, if I use the "Node.js command prompt" and run:

npm -g install npm 

It updates npm and running npm command I get the following:

Specify configs in the ini-formatted file:
    C:\Users\MyUsername\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

[email protected] C:\Users\MyUsername\AppData\Roaming\npm\node_modules\npm

If I got back to Visual Studio 2015 Node.js Interactive Window and run .npm, I see the version hasn't changed, even with a VS restart. However, I had a long filename issue as reported by other users and not had the issue so I believe that npm 3.8.0 is actually being used but I can't be sure. How can I get Visual Studio 2015 to use the latest npm so I can avoid the long file name problem? Does the Node.js Interactive Window have any relevance here? Thanks!

Upvotes: 0

Views: 2293

Answers (2)

spaceagestereo
spaceagestereo

Reputation: 554

Running npm-windows-upgrade within the Node.js command prompt and adding it with the path option with the path output in Visual Studio 2015 (above) fixed it for me.

http://www.triplet.fi/blog/npm-3-will-bring-brighter-future-for-windows-users/

https://github.com/felixrieseberg/npm-windows-upgrade

Upvotes: 0

Dauren Akilbekov
Dauren Akilbekov

Reputation: 5025

Go to Tools -> Options -> Projects and Solutions -> External Web Tools and add path to your node install. Then move it up in the list of dependencies.

Upvotes: 1

Related Questions