Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm not installing jsdom in Windows

Tags:

node.js

npm

jsdom

Im building an app in node.js with jQuery, but when I try to execute, it says it couldnt find module jsdom so, even though I dont understand why installing jQuery didnt install this dependency, I run manually npm install jsdom and I get this error message:

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of t he component to the system path if it is installed elsewhere. [C:\Sites\myapp\node_modules\jsdom\node_modules\contextify\build\binding.sln]

I tried the first option, but still didnt help. What am I (missing|doing wrong)?

like image 342
Enrique Moreno Tent Avatar asked Jun 13 '13 21:06

Enrique Moreno Tent


People also ask

Why is npm not installing?

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.

Why is npm install not working on CMD?

You need to make sure you have a package. json file right in the current directory where you run the command. Once you see there's a package. json file in the output as shown above, then you can run the npm install command.

What is Jsdom npm?

jsdom is a pure JavaScript implementation of the DOM and browser APIs that runs in node. If you're not using Jest and you would like to run your tests in Node, then you must install jsdom yourself. There's also a package called global-jsdom which can be used to setup the global environment to simulate the browser APIs.


1 Answers

You're not the only one having issues with installing jsdom on windows. You could try these instructions: http://www.steveworkman.com/node-js/2012/installing-jsdom-on-windows/

or use Cheerio which is easier to install on windows and does a similar job.

like image 56
AndyD Avatar answered Oct 08 '22 15:10

AndyD