Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node npm error on windows looking for tools version

Im trying to use node and when i go to install the npm packages via 'npm install package.json'
I am currently using windows 8.1 as my os. It began when I started using redis but im not sure if it is because of redis. The error I get is

MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "4.0".

The full console print out is here

If anyone has come across this error and how to fix it would be greatly appreciated

like image 480
Dennington-bear Avatar asked Jun 12 '14 10:06

Dennington-bear


People also ask

Why npm is not working on Windows?

The Npm command not found error can appear when you install or upgrade npm. On Windows, the cause of this error could be that a PATH or system variable is not correctly set. The error can also occur if you do not have npm or Node. js installed, have an outdated version, or have permission issues.

How do I fix npm installation errors?

If your npm is broken: On Mac or Linux, reinstall npm. Windows: If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer (see this note about installing the latest stable version).


2 Answers

Provided that you have Nodejs installed, start Windows CMD in admin mode and run the following:

npm install --global --production windows-build-tools 

and restart your PC afterwards.

like image 200
Tomas Randus Avatar answered Sep 21 '22 19:09

Tomas Randus


Install Visual Studio or Visual Studio Express 2013. You can download them here: http://www.visualstudio.com/downloads/download-visual-studio-vs

like image 24
Gergo Erdosi Avatar answered Sep 21 '22 19:09

Gergo Erdosi