Getting the error "Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320" while module installation by npm
I get the error "Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320" trying to install any module by npm via proxy, for example, request or cheerio:
npm config set proxy http://username:[email protected]:8080 npm config set https-proxy https://username:[email protected]:8080
npm install cheerio
//
Thus, request module is not installed at all, and cheerio module is installed without dependencies.
//
npm --version 2.14.3
node --version v4.1.0
OS: windows xp sp3
Thanks, I didn't know that! In libuv we support VS >= 2008 :-)
That's interesting. Is it an alternative to VS then? Anyway, I'm not sure how or if node would work with it, as vcbuild.bat looks for environment variables set by VS.
Not really. AFAIK Windows SDK >= 8 no longer includes any compiler.
IIRC you could compile stuff for x64 with VS 2012 express + the SDK.
Here, on an another computer with Windows SDK 7.1 and Python 2.7 only:
So, I guess the following (from Installation)
You need to have Microsoft Visual Studio 2012/2010 (Express edition is fine) as well as Python 2.6/2.7.
is not actual now at least for 4.x version.
What can I do to clearify the situation and get more verbous output from vcbuild?
@SergeKornilov : edit vcbuild.bat and remove (or comment with REM) the first line. Eg:
REM @echo off
Well, here it is (last lines of the output):
C:\nodejsbuild\node-master>set NODE_VERSION=
C:\nodejsbuild\node-master>set TAG=
C:\nodejsbuild\node-master>set FULLVERSION=
C:\nodejsbuild\node-master>for /F "usebackq tokens=*" %i in (`python "C:\nodejsbuild\node-master\tools\getnodeversion.py"`) do s
et NODE_VERSION=%i
C:\nodejsbuild\node-master>set NODE_VERSION=5.0.0
C:\nodejsbuild\node-master>rem echo 5.0.0
C:\nodejsbuild\node-master>if not defined NODE_VERSION (
echo Cannot determine current version of Node.js
exit /b 1
)
C:\nodejsbuild\node-master>if not defined DISTTYPE set DISTTYPE=release
C:\nodejsbuild\node-master>if "release" == "release" (
set FULLVERSION=5.0.0
goto exit
)
C:\nodejsbuild\node-master>if not defined DISTTYPEDIR set DISTTYPEDIR=release
C:\nodejsbuild\node-master>goto :EOF
C:\nodejsbuild\node-master>
I haven't tried this myself, but as far as I know VS2013 can only be installed on Windows 7 or later (or the corresponding server editions, Windows Server 2008 R2 or later). And since building Node requires VS2013 or VS2015, that disqualifies XP as a build machine.
As far as I can see I need Windows 7 with VS2013, only then I can build node targeted it for XP, right?
Correct. You might as well go to the latest and greatest and use VS2015. You'll need Windows 7 SP1 minimum.
Looking at your output above, there also seems to be a bug in vcbuild.bat. For one thing, I can see that it contains two labels named the same (:exit). Hopefully this only causes problems on XP. Please let us know if you still have problems on later OS versions.
As a side thought, I wonder if the VS 2013 minimum requirement also applies to compiling native modules. If that is the case, it would mean that Node on XP is seriously limited.
Ok. I'll try to build node on Win7 a bit later... I have only to install VS 2013. Merlin's beard! I just wanted to install cheerio module via npm :smiley:.
I am using windows 10. I also having that issue. "Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320" Any one have solutions?
@janaka1379 we probably have one! May I ask you to give a try to that patch?
Any update? @janaka1379 did you try using the patch? (https://github.com/nodejs/node/pull/2991)
Edited: I think fedor meant this patch
I am seeing this issue too when testing my platform that worked on previous node versions.
I will attempt to build with this patch and let you know.
The latest version of node.js (4.1.2) has the same problem.
@SergeKornilov of course it does, I haven't landed the patch yet.
@indutny Am I correct that the problem could be observed only on windows platform?
@ChALkeR so far it looks like this
I have the same problem in Win XP. I try install a express with command line npm install express -g and I get the msg ""Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320"
Where do I put this code?
- I do not find the file tls_wrap.cc.
@veneMarcos tls_wrap.cc is here: https://github.com/nodejs/node/blob/master/src/tls_wrap.cc , but I'm not exactly sure why are you trying to find it. The patch is against _tls_wrap.js, which could be found here: https://github.com/nodejs/node/blob/master/lib/_tls_wrap.js .