Closed vyking60 closed 3 years ago
Is it maybe running on Microsoft IIS: https://github.com/SAP/node-rfc/issues/139 ?
Did you check if Visual C++ 2013 re-distributable installed: https://github.com/SAP/node-rfc#windows ?
How is node-rfc installed? Locally/globally, using npm install
or built from source?
If nothing of above helps, the procmon
can help find the missing part: https://github.com/SAP/node-rfc/issues/127#issuecomment-600020359
Thanks for quick response! IIS is not used. I am working directly in VSCode C++ 2013 is installed - even both x386 and X64 node-rfc is installed with npm locally. During debugging I see that exception is catched in noderfc-bindings.js on line 36:
exports.noderfc_binding = noderfc_binding = require("../binding/sapnwrfc");
And I see file sapnwrfc.node in bindings folder.
How can I get help procman?
procman can trace the DLLs loading chain, to find out which DLL exactly fails. Example: https://github.com/SAP/node-rfc/issues/127#issuecomment-600020359
The VSCode itself does not matter but the re-distributable is important (Add/Remove Programs screenshot):
If x86 not needed, best remove it and/or try to re-install the re-distributable.
You can trace runtime info before exception, adding something like this in node_modules/node-rfc/lib/wrapper/noderfc-bindings.js
// verify SAP NWRFC SDK is on PATH
console.log(process.env.PATH)
try {
exports.noderfc_binding = noderfc_binding = require("../binding/sapnwrfc");
}
Could you please post the output of:
dir %SAPNWRFC_HOME%\lib
Visual C+ x386 is uninstalled;
Visual C++ 2013 X64 is still installed
Console.log of PATH and SAPNWRFC_HOME before exports.noderfc...:
dir %SAPNWRFC_HOME%\lib from TERMINAL node app folder: Variable not evaluated!!
dir from Command prompt;
dir %SAPNWRFC_HOME%\lib
from TERMINAL node app folder: Variable not evaluated!!
The PowerShell syntax is dir $env:SAPNWRFC_HOME\lib
, should be fine
The NWRFC SDK looks like correct 64 bit version, no idea what else to check. RFC SDK files look correct and should work with the "lib" folder on PATH.
Perhaps to try with another Windows user or fresh new Windows installation. C++ redistributable re-installations do not always work as expected. Some users reported in Issues that only re-installation helped.
Or trace with procmon first.
Reinstallation would be the last option. I played with procmon and created one file. Can you check it if there is anything to see. Otherwise I would need some help to produce usefull one Logfile.zip
Problem solved. Thanks for help, Srdjan. (Re)Installation of C++ Build tools helped (MSVC 14.28)
I have installed SAP RFC SDK 750 on win X64. All post installation checks are OK, till loading node-rfc modules. Copying nwrfcsdk\lib files (dll,...) to widows\system32 also didn't help
Environment looks OK: C:\Users\si4uoh>@echo off findstr Patch "%SAPNWRFC_HOME%\lib\sapnwrfc.dll" 750 Patch Level 7
Also PATH is OK
STARTRFC returns OK response form target SAP system (SAP system ID , netweaver version,...)
BUT node -p "require('node-rfc')" returns:
How I can find where the problem is?