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)?
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With