Tag Archive | npm

NPM MSBuild Errors Build Tool Cannot be Found

The builds tools for Visual Studio 2010 (Platform Toolset = ‘v100’) cannot be found.

If you work with NPM and NodeJs long enough and also develop using Visual Studio you’re bound to see the above complaint when loading npm packages.

There are couple things you can do. First if you are on Windows 7 download and install the Windows 7.1 SDK. You may need to uninstall any C++ redistributable runtimes if they are installed. The SDK install could fail. If it does that is likely why.

On Windows 8 running Visual Studio 2012 its a bit trickier. Often you’ll find node-gyp pointing to the wrong tool-set for building. One quick fix you can try is to re-install Visual Studio Update 3. This has successfully at least in my case resolved the issue.

Otherwise in a pinch install your npm package in the following manner and explicitly define the tool-set to use.

--msvs_version=2012

Advertisements

Clearing Node’s NPM Cache

Pretty simple really

# rm -rf ~/.npm
# npm cache clear

Use this process when you need to make sure a package isn’t loading anything from npm’s cache. Say you’ve updated or did a force update of your package and you need to make sure it pulls everything down and updates changes.

For a full reference on NPM  you can go here.