SAP / node-rfc

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

The specified module could not be found. #159

Closed AmnahZia closed 4 years ago

AmnahZia commented 4 years ago

I have installed node-rfc will all the prerequisites and have followed all the troubleshooting steps that are running fine. I am currently only trying to run the following lines of code:

"use strict"; const Client = require("node-rfc").Client;

Capture

and getting the error that it can not find the module sapnwrfc.node. Though, the file is present at the same location that it specifies.

I am using nwrfc750P_6-70002755 and The latest version of node LTS 12.18.3

Please help me find the bug.

Thank You

bsrdjan commented 4 years ago

The sapnwrfc.node is found and the error complains about not being able to find or load the SAP NWRFC SDK.

Here more info on SDK installation and few troubleshooting tips: https://github.com/SAP/node-rfc/blob/master/doc/installation.md#sap-nwrfc-sdk-installation

AmnahZia commented 4 years ago

Thank you for the reply @bsrdjan None of the mentioned solutions worked for me. I have found an alternate way to make things work. I copied all the files from sapnwrfc/lib folder, pasted them to C:\windows\system32 and it's working like a charm. Though, i still can't figure out the logic behind this making it work.

bsrdjan commented 4 years ago

It sounds like SAP NWRFC SDK lib folder was not on Windows PATH, or the user did not have permissions for SAP NWRFC SDK lib folder.

AmnahZia commented 4 years ago

It was on the windows PATH, might be an issue with the permission.