There are quite a few similar threads, which I thoroughly worked through this weekend, none of which contained the answer to my problem.
Installing the node package stanford-corenlp by calling
npm install stanford-corenlp
fails on my Windows 7 machine with the error output containing
npm ERR! Failed at the java@0.2.9 install script 'node-gyp rebuild'.
The first error displayed is:
child_process: customFds option is deprecated, use stdio instead.
This error ist followed by a few warnings and then hundreds of errors like these:
f:\appdata\roaming\npm\node_modules\stanford-corenlp\node_modules\java\src\java.h(10): error C2039: 'ObjectWrap' : is not a member of 'node' (..\src\java.cpp) [f:\AppData\Roaming\npm\node_modules\stanford-corenlp\node_modules\java\build\nodejavabridge_bindings.vcxproj]
f:\appdata\roaming\npm\node_modules\stanford-corenlp\node_modules\java\src\java.h(10): error C2504: 'ObjectWrap' : base class undefined (..\src\java.cpp) [f:\AppData\Roaming\npm\node_modules\stanford-corenlp\node_modules\java\build\nodejavabridge_bindings.vcxproj]
f:\appdata\roaming\npm\node_modules\stanford-corenlp\node_modules\java\src\java.h(23): error C2039: 'Arguments' : is not a member of 'v8' (..\src\java.cpp) [f:\AppData\Roaming\npm\node_modules\stanford-corenlp\node_modules\java\build\nodejavabridge_bindings.vcxproj]
f:\appdata\roaming\npm\node_modules\stanford-corenlp\node_modules\java\src\java.h(23): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\java.cpp) [f:\AppData\Roaming\npm\node_modules\stanford-corenlp\node_modules\java\build\nodejavabridge_bindings.vcxproj]
f:\appdata\roaming\npm\node_modules\stanford-corenlp\node_modules\java\src\java.h(23): error C2143: syntax error : missing ',' before '&' (..\src\java.cpp) [f:\AppData\Roaming\npm\node_modules\stanford-corenlp\node_modules\java\build\nodejavabridge_bindings.vcxproj]
...
..\src\java.cpp(43): error C2819: type 'v8::Persistent<T>' does not have an overloaded member 'operator ->'
..\src\java.cpp(43): error C2039: 'InstanceTemplate' : is not a member of 'v8::Persistent<T>'
..\src\java.cpp(43): error C2227: left of '->SetInternalFieldCount' must pointto class/struct/union/generic type
..\src\java.cpp(44): error C2819: type 'v8::Persistent<T>' does not have an overloaded member 'operator ->'
..\src\java.cpp(44): error C2039: 'SetClassName' : is not a member of 'v8::Persistent<T>'
..\src\java.cpp(44): error C2039: 'NewSymbol' : is not a member of 'v8::String'
..\src\java.cpp(44): error C3861: 'NewSymbol': identifier not found
..\src\java.cpp(46): error C2664: 'node::NODE_SET_PROTOTYPE_METHOD' : cannot convert parameter 1 from 'v8::Persistent<T>' to 'v8::Handle<T>'
...
At the moment I have 32-bit versions of, Python, Java-SDK and node.js installed and environment variables set. (I started with 64-bit versions with the same result.)
I installed the Visual Studio 2012 Express version.
I tried the Windows SDK version 8.1.
I tried calling the npm call from the SDK 6.1 (2008) command prompt.
I tried .NET 3.5 and 4.5.
I tried adding the
--msvs_version=2012
option to the npm call.
I tried updating node-gyp with
npm install node-gyp@latest
I would be grateful for any kind of input, especially the kind of input that makes me understand what is going on, so that I might figure out the solution by myself.