SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
252 stars 74 forks source link

Unable to install node-rfc #43

Closed StephanusRex closed 6 years ago

StephanusRex commented 6 years ago

Hello. I'm running into many errors trying to install node-rfc on my PC. Here's my setup:

OS: Windows 10 IIS: IIS 7 Express (32-bit) NOTE: I could not find a 64-bit version of IIS 7 Express Node: 8.9.4 (32-bit)

Also, the SAP NW RFC SDK is on my PC and the paths to c:\nwrfcsdk and c:\nwrfcsdk\lib are both in the PATH environment variable.

When I run npm install node-rfc I'm getting the following warnings & errors.

Thanks in advance!

> node-rfc@0.1.13 preinstall C:\NodeJSProjects\mim\node_modules\node-rfc
> npm install node-pre-gyp

+ node-pre-gyp@0.6.39
added 113 packages in 6.259s

> node-rfc@0.1.13 install C:\NodeJSProjects\mim\node_modules\node-rfc
> node-pre-gyp install --fallback-to-build

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  rfc.cc
  error.cc
  rfcio.cc
  Client.cc
  win_delay_load_hook.cc
..\src\Client.cc(364): warning C4305: 'argument': truncation from 'v8::Local<v8::Boolean> (__cdecl *)(v8::Isolate *)' to 'bool' [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
..\src\rfcio.cc(170): warning C4244: 'argument': conversion from 'int64_t' to 'const RFC_INT', possible loss of data [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
..\src\rfcio.cc(173): warning C4244: 'argument': conversion from 'int64_t' to 'const RFC_INT1', possible loss of data [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
..\src\rfcio.cc(176): warning C4244: 'argument': conversion from 'int64_t' to 'const RFC_INT2', possible loss of data [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1189,5): warning MSB8012: TargetPath(..\win32_x86\rfc.node) does not match the Linker's OutputFile property value (C:\NodeJSProjects\mim\node_modules\node-rfc\build\win32_x86\rfc.node). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
     Creating library win32_x86\rfc.lib and object win32_x86\rfc.exp
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetFieldDescByName@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcAppendNewRow@8 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetString@24 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetParameterDescByName@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetTime@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSetFloat@20 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetNum@20 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSetNum@20 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcUTF8ToSAPUC@24 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetParameterCount@12 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetFloat@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetFieldCount@12 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSAPUCToUTF8@24 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetXString@24 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetStructure@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSetChars@20 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSetInt@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetInt@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSetInt2@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetInt2@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSetXString@20 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSetDate@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetStringLength@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetTable@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetChars@20 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSetString@20 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetRowCount@12 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetCurrentRow@8 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetInt1@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetFieldDescByIndex@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetBytes@20 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcMoveTo@12 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetDate@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSetInt1@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSetBytes@20 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcSetTime@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
rfcio.obj : error LNK2001: unresolved external symbol _RfcGetParameterDescByIndex@16 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
Client.obj : error LNK2001: unresolved external symbol _RfcGetFunctionDesc@12 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
Client.obj : error LNK2001: unresolved external symbol _RfcInvoke@12 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
Client.obj : error LNK2001: unresolved external symbol _RfcGetConnectionAttributes@12 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
Client.obj : error LNK2001: unresolved external symbol _RfcCloseConnection@8 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
Client.obj : error LNK2001: unresolved external symbol _RfcOpenConnection@12 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
Client.obj : error LNK2001: unresolved external symbol _RfcPing@8 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
Client.obj : error LNK2001: unresolved external symbol _RfcCreateFunction@8 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
Client.obj : error LNK2001: unresolved external symbol _RfcGetVersion@12 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
Client.obj : error LNK2001: unresolved external symbol _RfcDestroyFunction@8 [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
win32_x86\rfc.node : fatal error LNK1120: 46 unresolved externals [C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc.vcxproj]
Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc\rfc.node --module_name=rfc --module_path=C:\NodeJSProjects\mim\node_modules\node-rfc\build\rfc' (1)
bsrdjan commented 6 years ago

Did you check if SAPNWRFC_HOME env variable correctly set? It should point to SAP NW RFC SDK root folder, c:\nwrfcsdk in this case.

StephanusRex commented 6 years ago

Thanks @bsrdjan. I had not done that but I did and rebooted (just to be sure) and tried again with the same result. I'm really at a loss. I've done this on 3 other machines (2 servers and 1 PC) and all were successful. I'm trying to get my development PC back up. Do you know if the SAP NW RFC SDK is 64bit or 32bit? I'm running 32bit Nodejs. The reason I'm not running 64-bit is because I also want to run IISNODE and I can only get IIS 7 Express in 32 bit which is why I'm using 32 bit for everything.

bsrdjan commented 6 years ago

SAP NW RFC SDK has both the 32 and 64 bit versions and for 32 bit nodejs, the 32 bit SAP NW RFC SDK is required. You are right, the version mismatch can also cause such issues.

StephanusRex commented 6 years ago

I downloaded the 64-bit IIS 8 Express, NodeJS 64 bit and all seems to be OK now. Thanks for the help.


Sincerely,

Steven M. King

On Wed, Mar 7, 2018 at 3:23 AM, Srdjan Boskovic notifications@github.com wrote:

SAP NW RFC SDK has both the 32 and 64 bit versions and for 32 bit nodejs, the 32 bit SAP NW RFC SDK is required. You are right, the version mismatch can also cause such issues.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SAP/node-rfc/issues/43#issuecomment-371060469, or mute the thread https://github.com/notifications/unsubscribe-auth/AXibV-8DQzZSw6CRaj_yfc6qiy4ZLB3xks5tb5kUgaJpZM4SdyGe .

bsrdjan commented 6 years ago

Glad to hear.