Open RamprasathS opened 8 years ago
Looks like you have a different CPU type ia32
. So the precompiled binding sapnwrfc.node could not be used. It then tries to compile it from source and it searches for the sapnwrfc include files.
You have to set the environment variable SAPNWRFC_HOME
to the contents for the SDK.
Perhaps the rebuild helps, but I only have experience with 64bit.
After i set the environment variable, I am getting the below error message. Please let me know anyother change i need to do.
d:\node\sapnwrfc\src\Common.h(105): error C3861: 'New': identifier not found (.
.\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Common.h(108): error C2039: 'Close' : is not a member of '
v8::HandleScope' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
C:\Users\323847.node-gyp\4.2.2\include\node\v8.h(869) : see declarat
ion of 'v8::HandleScope'
d:\node\sapnwrfc\src\Common.h(113): error C2248: 'v8::HandleScope::HandleScope'
: cannot access protected member declared in class 'v8::HandleScope' (..\src\F
unction.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
C:\Users\323847.node-gyp\4.2.2\include\node\v8.h(885) : see declarat
ion of 'v8::HandleScope::HandleScope'
C:\Users\323847.node-gyp\4.2.2\include\node\v8.h(869) : see declarat
ion of 'v8::HandleScope'
d:\node\sapnwrfc\src\Common.h(114): error C2039: 'New' : is not a member of 'v8
::String' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
C:\Users\323847.node-gyp\4.2.2\include\node\v8.h(2081) : see declara
tion of 'v8::String'
d:\node\sapnwrfc\src\Common.h(114): error C3861: 'New': identifier not found (.
.\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Common.h(124): error C2039: 'Close' : is not a member of '
v8::HandleScope' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
C:\Users\323847.node-gyp\4.2.2\include\node\v8.h(869) : see declarat
ion of 'v8::HandleScope'
d:\node\sapnwrfc\src\Common.h(124): error C2660: 'v8::Undefined' : function doe
s not take 0 arguments (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vc
xproj]
d:\node\sapnwrfc\src\Connection.h(37): error C2039: 'ObjectWrap' : is not a mem
ber of 'node' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(37): error C2504: 'ObjectWrap' : base class u
ndefined (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(48): error C2039: 'Arguments' : is not a memb
er of 'v8' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(48): error C4430: missing type specifier - in
t assumed. Note: C++ does not support default-int (..\src\Function.cc) [D:\node
\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(48): error C2143: syntax error : missing ','
before '&' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(49): error C2039: 'Arguments' : is not a memb
er of 'v8' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(49): error C4430: missing type specifier - in
t assumed. Note: C++ does not support default-int (..\src\Function.cc) [D:\node
\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(49): error C2143: syntax error : missing ','
before '&' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(50): error C2039: 'Arguments' : is not a memb
er of 'v8' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(50): error C4430: missing type specifier - in
t assumed. Note: C++ does not support default-int (..\src\Function.cc) [D:\node
\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(50): error C2143: syntax error : missing ','
before '&' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(51): error C2039: 'Arguments' : is not a memb
er of 'v8' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(51): error C4430: missing type specifier - in
t assumed. Note: C++ does not support default-int (..\src\Function.cc) [D:\node
\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(51): error C2143: syntax error : missing ','
before '&' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(52): error C2039: 'Arguments' : is not a memb
er of 'v8' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(52): error C4430: missing type specifier - in
t assumed. Note: C++ does not support default-int (..\src\Function.cc) [D:\node
\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(52): error C2143: syntax error : missing ','
before '&' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(53): error C2039: 'Arguments' : is not a memb
er of 'v8' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(53): error C4430: missing type specifier - in
t assumed. Note: C++ does not support default-int (..\src\Function.cc) [D:\node
\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(53): error C2143: syntax error : missing ','
before '&' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(54): error C2039: 'Arguments' : is not a memb
er of 'v8' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(54): error C4430: missing type specifier - in
t assumed. Note: C++ does not support default-int (..\src\Function.cc) [D:\node
\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Connection.h(54): error C2143: syntax error : missing ','
before '&' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(38): error C2039: 'ObjectWrap' : is not a membe
r of 'node' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(38): error C2504: 'ObjectWrap' : base class und
efined (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(41): error C2039: 'Arguments' : is not a member
of 'v8' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(41): error C4430: missing type specifier - int
assumed. Note: C++ does not support default-int (..\src\Function.cc) [D:\node\s
apnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(41): error C2143: syntax error : missing ',' be
fore '&' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(47): error C2039: 'Arguments' : is not a member
of 'v8' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(47): error C4430: missing type specifier - int
assumed. Note: C++ does not support default-int (..\src\Function.cc) [D:\node\s
apnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(47): error C2143: syntax error : missing ',' be
fore '&' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(48): error C2039: 'Arguments' : is not a member
of 'v8' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(48): error C4430: missing type specifier - int
assumed. Note: C++ does not support default-int (..\src\Function.cc) [D:\node\s
apnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(48): error C2143: syntax error : missing ',' be
fore '&' (..\src\Function.cc) [D:\node\sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\sapnwrfc\src\Function.h(106): error C2039: 'Dispose' : is not a member
of 'v8::Persistentv8::Function,v8::NonCopyablePersistentTraitsC:\Program Files\MSBuild\12.0\bin\msbuild.exe
failed wit
h exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\node\sapnwrfc
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN EPACKAGEJSON sapnwrfc@0.1.5 No license field.
Please update to 0.1.8 and try again.
After updating I am getting the old error again.
Note: I havent removed the environment variable which I set before.
D:\node\node-sapnwrfc>npm install
sapnwrfc@0.1.8 install D:\node\node-sapnwrfc node preinstall.js
D:\node\node-sapnwrfc>if not defined npm_config_node_gyp (node "C:\Program Files \nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node- gyp.js" clean ) else (node clean ) { [Error: Could not locate the bindings file. Tried: → D:\node\node-sapnwrfc\build\sapnwrfc.node → D:\node\node-sapnwrfc\build\Debug\sapnwrfc.node → D:\node\node-sapnwrfc\build\Release\sapnwrfc.node → D:\node\node-sapnwrfc\out\Debug\sapnwrfc.node → D:\node\node-sapnwrfc\Debug\sapnwrfc.node → D:\node\node-sapnwrfc\out\Release\sapnwrfc.node → D:\node\node-sapnwrfc\Release\sapnwrfc.node → D:\node\node-sapnwrfc\build\default\sapnwrfc.node → D:\node\node-sapnwrfc\compiled\4.2\win32\ia32\sapnwrfc.node] tries: [ 'D:\node\node-sapnwrfc\build\sapnwrfc.node', 'D:\node\node-sapnwrfc\build\Debug\sapnwrfc.node', 'D:\node\node-sapnwrfc\build\Release\sapnwrfc.node', 'D:\node\node-sapnwrfc\out\Debug\sapnwrfc.node', 'D:\node\node-sapnwrfc\Debug\sapnwrfc.node', 'D:\node\node-sapnwrfc\out\Release\sapnwrfc.node', 'D:\node\node-sapnwrfc\Release\sapnwrfc.node', 'D:\node\node-sapnwrfc\build\default\sapnwrfc.node', 'D:\node\node-sapnwrfc\compiled\4.2\win32\ia32\sapnwrfc.node' ] } error a precompiled module could not be found or loaded info trying to compile it...
D:\node\node-sapnwrfc>if not defined npm_config_node_gyp (node "C:\Program Files
\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-
gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
binding.cc
Connection.cc
d:\node\node-sapnwrfc\src\Common.h(30): fatal error C1083: Cannot open include
file: 'sapnwrfc.h': No such file or directory (..\src\binding.cc) [D:\node\node
-sapnwrfc\build\sapnwrfc.vcxproj]
Function.cc
d:\node\node-sapnwrfc\src\Common.h(30): fatal error C1083: Cannot open include
file: 'sapnwrfc.h': No such file or directory (..\src\Connection.cc) [D:\node\n
ode-sapnwrfc\build\sapnwrfc.vcxproj]
d:\node\node-sapnwrfc\src\Common.h(30): fatal error C1083: Cannot open include
file: 'sapnwrfc.h': No such file or directory (..\src\Function.cc) [D:\node\nod
e-sapnwrfc\build\sapnwrfc.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files\MSBuild\12.0\bin\msbuild.exe
failed wit
h exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\node\node-sapnwrfc
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
Finally I got it,
Need to copy sdk inside node-sapnwrfc and do npm install. It generated build in the build folder, Then i have manually copied to the node module folder and ran the test code, It is working out.
Thanks Stefan for your time, I will reach you, If I face any issues in future.
I tried npm install sapnwrfc, I have copied sdk lib to system32, I am using windows 7 32 bit os, But i am getting the below error, Please help me on this,
C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc>if not defined npm_co fig_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\ ...\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node clean ) { [Error: Could not locate the bindings file. Tried: → C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\build\sapnwrfc.nod
→ C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\build\Debug\sapnwr c.node → C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\build\Release\sapn rfc.node → C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\out\Debug\sapnwrfc node → C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\Debug\sapnwrfc.nod
→ C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\out\Release\sapnwr c.node → C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\Release\sapnwrfc.n de → C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\build\default\sapn rfc.node → C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\compiled\4.2\win32 ia32\sapnwrfc.node] tries: [ 'C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\build\ apnwrfc.node', 'C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\build\ ebug\sapnwrfc.node', 'C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\build\ elease\sapnwrfc.node', 'C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\out\De ug\sapnwrfc.node', 'C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\Debug\ apnwrfc.node', 'C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\out\Re ease\sapnwrfc.node', 'C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\Release \sapnwrfc.node', 'C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\build\ efault\sapnwrfc.node', 'C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc\compile \4.2\win32\ia32\sapnwrfc.node' ] } error a precompiled module could not be found or loaded info trying to compile it...
C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc>if not defined npm_co fig_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\ ...\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. binding.cc Connection.cc c:\users\323847\appdata\roaming\npm\node_modules\sapnwrfc\src\Common.h(30): fat al error C1083: Cannot open include file: 'sapnwrfc.h': No such file or directo ry (..\src\Connection.cc) [C:\Users\323847\AppData\Roaming\npm\node_modules\sap nwrfc\build\sapnwrfc.vcxproj] Function.cc c:\users\323847\appdata\roaming\npm\node_modules\sapnwrfc\src\Common.h(30): fat al error C1083: Cannot open include file: 'sapnwrfc.h': No such file or directo ry (..\src\binding.cc) [C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwr fc\build\sapnwrfc.vcxproj] c:\users\323847\appdata\roaming\npm\node_modules\sapnwrfc\src\Common.h(30): fat al error C1083: Cannot open include file: 'sapnwrfc.h': No such file or directo ry (..\src\Function.cc) [C:\Users\323847\AppData\Roaming\npm\node_modules\sapnw rfc\build\sapnwrfc.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files\MSBuild\12.0\bin\msbuild.exe failed wi h exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules npm\node_modules\node-gyp\lib\build.js:270:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proce s.js:200:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\node s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc gyp ERR! node -v v4.2.2 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok sapnwrfc@0.1.8 C:\Users\323847\AppData\Roaming\npm\node_modules\sapnwrfc ├── bindings@1.2.1 └── nan@2.1.0