SAP / node-rfc

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

Node v. 12.18.0 / node-rfc v. 1.2.0 #150

Closed steve-king-ky closed 4 years ago

steve-king-ky commented 4 years ago

I downloaded the latest versions of both Node and node-rfc but now my applications are broken. As soon as the "require('node-rfc')" line is executed, I get the following error:

Error: The specified procedure could not be found.
\\?\c:\rfctest\node_modules\node-rfc\lib\binding\sapnwrfc.node

 The SAP NW RFC SDK could not be loaded, check the installation: http://sap.github.io/node-rfc/install.html#sap-nw-rfc-sdk-installation
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1188:18)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (c:\rfctest\node_modules\node-rfc\lib\wrapper\sapnwrfc-client.js:8:33)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (c:\rfctest\node_modules\node-rfc\lib\index.js:6:10)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)

Is there a version conflict I'm not aware of?

bsrdjan commented 4 years ago

Did you try npm install node-rfc and could you please post the full installation log?

steve-king-ky commented 4 years ago

Thanks for the quick response.

Here's the output:

C:\rfctest>npm install node-rfc --s > install.txt

C:\rfctest>type install.txt
+ node-addon-api@2.0.1
+ prebuild@10.0.0
+ prebuild-install@5.3.4
+ cmake-js@6.1.0
added 252 packages from 217 contributors and audited 252 packages in 36.923s

3 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

+ node-rfc@1.2.0
updated 1 package and audited 53 packages in 42.303s
found 0 vulnerabilities
bsrdjan commented 4 years ago

Just tested with node 12, on Windows, without issues.

How the nodejs is installed on your system, via some node version manager (nvm) or by installer? Could it be that 32 bit node is installed, instead of 64 bit?

Did you check if SAP NWRFC SDK properly installed, by running the rfcexec in NWRFC SDK bin folder ?

steve-king-ky commented 4 years ago

Yes, Node is definitely 64-bit. No, I haven't ran rfcexec. I'll try that. Thanks...

steve-king-ky commented 4 years ago

I've not ran this program before and am a bit befuddled as to how to use it properly. Google didn't help. Do you have some advice on how I can test with it, please?

steve-king-ky commented 4 years ago

It appears that the versions of Node and the library conflict. I downgraded the node-rfc library to 1.0.0 and it works w/ the latest version of Node.

bsrdjan commented 4 years ago

Could it be that your SAP NWRFC SDK version is not the latest, 7.50 PL6 ?

In that case, please upgrade to the latest SDK. The SDK is backwards compatible and older versions are not supported, neither node-rfc issues related to older SDK versions.

bsrdjan commented 4 years ago

Please find detailed info in updated documentation: verify-sap-nwrfc-sdk-release

Is it fixed in the meantime?

steve-king-ky commented 4 years ago

Yes, it is working now provided I use Node 1.0.0. Unfortunately, we're not in a position to update the SAP NWRFC SDK as we've lost our maintenance with SAP.

bsrdjan commented 4 years ago

Sorry to hear about SAP maintenance. Older SDKs support by node-rfc would internal version checks at several points, inside the node-rfc. That complicates the node-rfc implementation and testing and even if provided, only the latest SDK is supported by SAP. That is why node-rfc also supports the latest SDK only.