npm not installing jsdom in Windows - node.js

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)?

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.

Related

I am trying to install web3 module through npm

Latest code snippet to show what version of Web2.min.js I am using
This is the warning i m getting in browser and i am able to intract with remix contractCommand Used :C:\Users\Hp\Desktop\BC_Project>npm install web3
providing the image showing error message
Have you got the things required for node-gyp environment?
Python
MSBuild Tools
Visual C++ Build Tools core features
Windows 8.1 SDK
Windows 10 SDK (10.0.x.x)

Visual Studio Installer is not installing node.js

In Visual Studio Installer, I selected the Node.js development option. It runs successfully. But, if I try to run cmd node -v. It tells me node does not exist.
I tried a few other things including uninstalling and reinstalling the Node.js development option in VS Installer. Plus installing the latest version of node from the website.
However, when I try to run the pre-packed Angular solution that comes with VS 2017 I have issues. The solution will not even start.
The best I have been able to do is install Node 6.10.3. Once I do that, the web site comes up. But, I get a JavaScript error in the vendor.js file. I am able to continue but I get this error when I try navigate to another menu item. Plus the Hot Module Replacement does not seem to be working. (It does not automatically recompile my TypeScript file if I made a change).
I think the key is getting the Node.js development option installed correctly since I am able to run the pre-packed Angular solution on another PC and the Hot Module Replacement works fine.
Please let me know if anyone has any ideas on how to resolve.
I had a similar, if not the same, issue. Check the Visual Studio installation directory (2017 Professional in this case) for Node:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\NodeJs
If the executable is there, add the directory to your PATH.

Node Sass No Binding for Your current environment

I've seen quite a few of these questions on SO, but none seem to solve or match the problem.
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x. The odd thing is, I don't have Node.js 6.x installed. From the command line, node -v gives me v5.10.1.
I'm the Angular4 Universal Asp.net core visual studio 2017 template straight out of the box.
I've tried
npm rebuild node-sass --force
Reordering node in Web External toolsin Visual Studio
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HL4JSD9SSV8E": An unhandled exception was thrown by the application.
System.Exception: Call to Node module failed with error: Prerendering failed because of error: Error: Module build failed: Error: Missing binding D:\Projects\angular2\node_modules\node-sass\vendor\win32-x64-48\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x
Found bindings for the following environments:
Windows 64-bit with Node.js 5.x
This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass --force to build the binding for your current environment.
at module.exports (D:\Projects\angular2\node_modules\node-sass\lib\binding.js:15:13)
at Object. (D:\Projects\angular2\node_modules\node-sass\lib\index.js:14:35)
Where have I gone wrong?
On Visual Studio 2017 (15.4.1) you should go to:
Tools > Configure External Tools > Projects and Solutions > Web Package Management > External Web Tools
Then reorder the tools as seen below.
This worked for me.
Deleting node_modules folder and re-installing npm modules using npm install worked for me.
Visual Studio ships it's own version of Node embedded so that's why you see a mismatch.
The TROUBLSHOOTING guide in the repo covers how to work around this https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#using-node-sass-with-visual-studio-2015-task-runner

npm install bcrypt on Windows Server 2012

I'm getting this error when trying to install my node modules for my node server.
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 the component to the system path if it is installed elsewhere.
[C:\inetpub\wwwroot\PearsonRealty- API\node_modules\bcrypt\build\binding.sln]
I've tried to install the .NET Framework 2.0 SDK, but it just exits out and never runs. I can't install Microsoft Visual Studio since I'm on an AWS EC2 instance and I wouldn't have enough space for it. Any help would be awesome, thanks.
You do need to install either VCExpress (preferrably at least 2015) or you can try the experimental VC Build Tools solution which is a smaller install than full-blown VCExpress. Otherwise, if you have one, you can try building on a local Windows machine first and then uploading the compiled addon directory to AWS.

Error on installing karma test runner

When I trying to install karma on windows 7. I am getting following 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 Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere. [C:\Users\user\AppData\Roaming\npm\node_modules\karma\
node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bind
ing.sln]
I installed .NET Framework 2.0 Software Development Kit (SDK) (x86) . still getting same error
Keep
Calm
and
Continue
Using
Karma
Here's the Karma owner's (Vojta Jina) comment on the issue:
this is just optional compilation of native module to speed things up.
Even without native module it will still work.
In any case, not a Karma issue, so closing. If you want to compile
native modules, use linux/mac ;-)
Btw. regarding your getting the same error even after SDK install, possibly VCBuild.exe and/or C++ compiler is not added to path.

Resources