Fatal error C1083 installing ursa - node.js

I got the following error installing URSA on node.js (I'm using windows 7).
c:\users\napoleon\node_modules\ursa\src\ursaNative.h(10): fatal error C1083: Ca
nnot open include file: 'openssl/rsa.h': No such file or directory [C:\Users\Na
poleon\node_modules\ursa\build\ursaNative.vcxproj]
gyp ERR! build error
I have tried (reading on the internet it seems the problem has to do with SDK or OpenSSL):
Reinstalling Windows SDK 7
Upgraded to the newer version 7.1.
Reinstalled OpenSSl 1.0.1h 64.
Removed the previous and installed OpenSSl 1.0.0 m (I have no idea what the m, h mean).
I have a few different versions of the redistributable Microsoft visual C++.
No idea what to try, any help is appreciated.
Edit: I checked the path and indeed it seems there isn't a file there. However it's supposed to be intalled BY ursa as far as I see, so the problem is probably ursa failing to install this.
Edit 2: I watched the folder while trying to install, a URSA folder appears and disappears with the error, so it's definitely a problem installing the file, anyone what can cause that.

After you install the openSSL library, VC++ needs to know how to find the include files when building stuff. That's not set up by default.
VC++ uses the INCLUDE environment variable as part of it's include file search path. So before you run the npm install, do this from the command line:
set INCLUDE=%INCLUDE%;<PATH TO OPENSSL INCLUDES GOES HERE>
Basically whatever the parent directory of openssl/rsa.h is, put that in the include path.

Related

gulp integration in Visual Studio 2017 not working

I'm attempting to get gulp integration into Visual Studio 2017. It's working on the command line. The Task Runner Explorer in VS2017 is telling me Failed to load. See output window.
The Output Window is telling me the following:
Failed to run "<ProjectPath>\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
<ProjectPath>\node_modules\node-sass\lib\binding.js:15
throw new Error(errors.missingBinary());
^
Error: Missing binding <ProjectPath>\node_modules\node-sass\vendor\win32-x64-47\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 5.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 8.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.
I attempt to run npm rebuild node-sass --force, only to be told Error: Can't find Python executable "C:\Python36\python.EXE", you can set the PYTHON env variable., which I confirmed existed.
I'm not sure how much farther I want to go down this rabbit hole. It appears to be a VS issue since everything works as expected on the command line. I'd like to get the gulp integration with VS working correctly.
Point your VS tools to the node installation on your path.
I can see in the error that there a version discrepancy between 5.x and 8.x - with VS likely being the older one (since it ships with pre-packaged and outdated node) and is taking execution precedence with the default setup.
I'm guessing you installed node-sass via your 8.x (external command line) instance but VS is trying to execute your gulp tasks via your VS's internal 5.x. node-sass leverages node-gyp to build a binary via installation scripts, and there will be incompatibilities across versions. In other words, this package, and many others that build binaries, are specifically tailored to the version of node it was installed against. To summarize, everything in node_modules/.bin is built against 8.x but is actually running on 5.x when you do so through Visual Studio.
Fear not, this is easily solved. Check out this answer for some historical context on this long running issue that many face. Basically, you want $(PATH) to be at the top of this list so your OS installation is always used...
Once you do this (just to be safe) - blow away node_modules, reinstall, and happy coding. VS really needs to stop shipping with pinned versions of node...
I ran into this problem on both Visual Studio 2017 and 2019. Apparently my Node install wasn't registered in the PATH variable (and I don't have permission to modify this on my work machine), so I manually added the link to Node at C:\Program Files\nodejs, moved that to the top location and that worked for me.
This drove me nuts until I found one more missing thing. Even if you configured everything as in the other answers you can get the same error, possibly if your user folder is not on the same drive as where Node is installed. Then also add %APPDATA%\npm to the external tools paths so globally installed Node tools will be found too.
So all in all the external tools config in VS should contain these two paths first, in this order:
C:\Program Files\NodeJS (or where you have Node installed).
%APPDATA%\npm
For me without #2 everything was working from the command line everywhere but not in VS. With it added everything now works in VS too.

Oracle oracledb NPM module won't build with node-gyp and Windows

I've been trying to get the Oracle client for Node.js, oracledb, built on Windows 7. When I run npm install oracledb I see a large number of errors, such as:
fatal error C1083: Cannot open include file: 'oci.h'
fatal error C1083: Cannot open include file: 'oratypes.h'
As well as error messages like unrecognizable template declaration/definition and syntax error : 'using'.
I've been trying to build the oracledb client mostly with Node.js 5.8.0, but I've tried with older versions as well with the same result. My python version is 2.7.9. I've installed Microsoft Visual Studio 2015 Express, the newest available right now, as well as the Oracle InstantClient 12.1 (also current), but I still get pages of compiler errors from the node-gyp build process when running npm install oracledb.
This isn't the first NPM module I've had trouble building, and I've installed older versions of Visual Studio in the past (2010, 2012, 2013). I've tried uninstalling them as well, but I'm not convinced they actually uninstalled fully.
The bulk of the instructions that need to be followed for building oracledb for Node.js can be found here. But I'll sum up the key points as well as point out the extra bit of knowledge that made all the difference.
First you need to install Oracle InstantClient and SDK into the same folder. It's simplest, perhaps, if you rename and move that folder so that it becomes c:\oracle\instantclient. You can get the basic InstantClient and SDK from Oracle's site. Make sure that you download 64 bit versions if you are using 64 bit Node.js and 32 bit versions if you are using 32 bit Node.js.
If you didn't install the InstantClient into c:\oracle\instantclient, then you need this next step. Add the following environment variables to your system:
set OCI_LIB_DIR=C:\my-path-to-instantclient-here\sdk\lib\msvc
set OCI_INC_DIR=C:\my-path-to-instantclient-here\sdk\include
The commands above could be pasted into a command prompt to temporarily set the values, but you'd have to go into Control Panel > System > Advanced > Environment Variables to create new variables with the correct paths that match your installation to make the changes permanent.
Make sure that your Node.js, the Oracle InstantClient folder, and Python are all in your system's PATH environment variable.
Next download and install Visual Studio Express 2015 for Desktop.
Ensure that it, too, is in your PATH.
Here is the trick that saved me: If you have multiple versions of Visual Studio set, you need to tell node-gyp which one to use (in this case, 2015). To do that you have options.
1) You could create an environment variable named GYP_MSVS_VERSION and set its value to 2015.
2) You could also pass the 2015 value on the NPM command line like this:
npm install oracledb --save --msvs_version=2015
Or you could, and I find this to be the best method, set the version of Visual Studio that node-gyp should use globally with the following command:
npm config set msvs_version 2015 --global
You can then do a npm config list to verify that the config change took hold.
At that point you should be able to do a regular old npm install --save oracledb command and have it install and build in whichever project you like. Other compiled NPM modules should also build well now, too.

Installing Sails leads to Link.exe error in windows

I'm trying to install Sails.JS 0.11.0 to my Windows 7 laptop (intel cpu) but receive an error when npm tries to build it. The error is pasted at the end of this message.
I'm using Node 0.10.38 (required for my use of the OracleDB module, so I can't upgrade to version 12 yet).
My laptop has Visual Studio 2013 Express Desktop which is used to compile.
The Sails npm install completes using npm -g list sails, but with errors, so I worry it's not properly installed.
So far, I've reboot my computer, wiped its temp files, and did everything I can think of. Any suggestions? I can't find any compatibility info on the Sails site (maybe I need to install an older version of Sails?).
The link-cvtres.write.[ID].tlog file referenced below seems to exist in that directory (which is built on the fly)... at least, a version of the file with a "1" in place of the "[ID]" is there.
Any help is appreciated.
Error Message (in the red output):
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(607,5): error MSB6003: The specified task executable "link.exe" could not be run. C:\Users\me\AppData\Roaming
\npm\node_modules\sails\node_modules\sails-hook-sockets\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\Release\obj\validation\validation.tlo
g\link-cvtres.write.[ID].tlog [C:\Users\me\AppData\Roaming\npm\node_modules\sails\node_modules\sails-hook-sockets\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-cl
ient\node_modules\ws\build\validation.vcxproj]`

Node Js npm install error

Im new to node js, im about to install a package via 'npm install', as you can see its 'ursa'.
So for now im stuck with this error C1083.
I use a 64bit maschine, OpenSSL is installed. Path of OpenSLL is
C:\OpenSSL-Win64
Error-Log
http://i.stack.imgur.com/CQSct.png
Microsoft Windows [Version 6.1.7601]
It seems your C++ compiler has problems finding the OpenSSL header files.
The Ursa GitHub page contains multiple issue topics about it not finding openSSL. There is a solution for ubuntu, but there is no general solution for Windows yet. I'd suggest asking for help there

"The installer has encountered an unexpected error installing this package...". Is it possible to install Node.js (v0.10.15) on Windows XP?

I want to use Node.js under Windows XP. I've downloaded the node-v0.10.15-x86.msi installer but when I try to install Node.js I always get this error at the middle of the process:
The installer has encountered an unexpected error installing this
package. This may indicate a problem with this package. The error code
is 2908.
Here is a screenshot:
Is it possible to install Node.js on Windows? I cannot find any installation instructions on their site. I have AMD Athlon XP 1833 MHz processor. It is quite old processor. May this be the reason?
So, I figured out how to install it :)
I did a double click on node-v0.10.15-x86.msi file in order to install Node. And that caused an error.
.msi files shouldn't be installed that way. I found a solution on this page http://thebackroomtech.com/2007/08/23/howto-extract-files-from-a-msi-file-using-the-windows-command-line/
So my steps in Windows command line. I pointed a directory where to unpack node-v0.10.15-x86.msi to:
C:\>msiexec /a "C:\Downloads\Programs\Node.js\node-v0.10.15-x86.msi" /qb TARGETDIR="C:\Program Files\nodejs"
And now it works. It unpacked Node.js and all its dependencies to C:\Program Files\nodejs. I just added the directory to PATH.
I'm glad I can use Node on Windows. Working under Ubuntu is a pain.
I had the same problem. For resolve this problem you need to remove this key from registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
Installer\UserData\S-1-5-21-1123561945-1935655697-1060284298-1003\
Components\AD95649F068525549B26938D7D18FEA7
Founded here
For me the S-1-5-21 was different, I renamed it to _del
HKEY_LOCAL_MACHINE
\SOFTWARE
\Microsoft
\Windows
\CurrentVersion
\Installer
\UserData
\S-1-5-21-1292428093-1606980848-1188629396-500_del

Resources