Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On windows: Impossibile trovare il modulo specificato - The specified module could not be found #127

Closed
sbarzaghialteaup opened this issue Mar 16, 2020 · 9 comments

Comments

@sbarzaghialteaup
Copy link

sbarzaghialteaup commented Mar 16, 2020

Hi,

On windows when I try to load the node-rfc module with:
const r = require ('node-rfc')

I get the message error:
Impossibile trovare il modulo specificato
In english should be "The specified module could not be found"

In the path the %SAPNWRFC_HOME%\lib is correct, launching the set command to check the path I get:
Path=...;C:\nwrfcsdk\bin;C:\nwrfcsdk\lib;

(no problems using it on ubuntu)

Thank you for help
Sam

@sbarzaghialteaup sbarzaghialteaup changed the title Impossibile trovare il modulo specificato - The specified module could not be found On windows: Impossibile trovare il modulo specificato - The specified module could not be found Mar 16, 2020
@bsrdjan
Copy link
Contributor

bsrdjan commented Mar 16, 2020

Hi Sam,

did you test if SAP NWRFC SDK is properly installed:

cd %SAPNWRFC_HOME%\bin
rfcexec.exe

and if the output is like in documentation ?

@sbarzaghialteaup
Copy link
Author

Hi,

Yes tested, it's correctly installed, I can execute it:
image

thanks for help
Sam

@sbarzaghialteaup
Copy link
Author

sbarzaghialteaup commented Mar 16, 2020

More info:
C:\Users\sbarzaghi\Documents>mkdir test-node-rfc

C:\Users\sbarzaghi\Documents>cd test-node-rfc

C:\Users\sbarzaghi\Documents\test-node-rfc>ver
Microsoft Windows [Versione 10.0.18362.693]

C:\Users\sbarzaghi\Documents\test-node-rfc>npm install node-rfc

[email protected] preinstall C:\Users\sbarzaghi\Documents\node_modules\node-rfc
npm install cmake-js prebuild-install prebuild node-addon-api

npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm notice created a lockfile as package-lock.json. You should commit this file.

[email protected] install C:\Users\sbarzaghi\Documents\node_modules\node-rfc
prebuild-install --tag-prefix -r napi || npm run prebuild

npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\sbarzaghi\Documents\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\sbarzaghi\Documents\package.json'
npm WARN Documents No description
npm WARN Documents No repository field.
npm WARN Documents No README data
npm WARN Documents No license field.

  • [email protected]
    updated 1 package and audited 5 packages in 29.564s
    found 0 vulnerabilities

C:\Users\sbarzaghi\Documents\test-node-rfc>set | findstr SAPNW
SAPNWRFC_HOME=C:\nwrfcsdk

C:\Users\sbarzaghi\Documents\test-node-rfc>set | findstr path
Path=C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Python37\Scripts;C:\Python37;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\ProgramData\chocolatey\bin;C:\WINDOWS\System32\OpenSSH;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\PuTTY;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Infocert\DiKe 6\RAO;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\nwrfcsdk\lib;C:\nwrfcsdk\bin;C:\Users\sbarzaghi\AppData\Local\Microsoft\WindowsApps;C:\Users\sbarzaghi\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\sbarzaghi\AppData\Roaming\npm;C:\Users\sbarzaghi\AppData\Local\now-cli;C:\Users\sbarzaghi\AppData\Local\Programs\Microsoft VS Code Insiders\bin;C:\Users\sbarzaghi\AppData\Local\hyper\app-3.0.2\resources\bin;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\sbarzaghi\AppData\Local\Programs\Fiddler;C:\nwrfcsdk\bin;C:\nwrfcsdk\lib;

C:\Users\sbarzaghi\Documents\test-node-rfc>rfcexec
Error: Not all mandatory parameters specified
Please start the program in the following way:
rfcexec -t -a -g -x
-f -s
The options "-t" (trace), "-f" and "-s" are optional.

Below further optional parameters are listed. You can find their
documentation in sapnwrfc.ini:
-on_cce <0, 1, 2> (On Character Conversion Error)
-cfit (Conversion Fault Indicator Token - the substitute symbol used if on_cce=2)
-keepalive (Sets the keepalive option. Default is 0.)
-delta <0, 1> (default 1, i.e. use delta-manager)
-no_compression (table compression, default is 0, i.e. compression is on)

C:\Users\sbarzaghi\Documents\test-node-rfc>dir /s /w %SAPNWRFC_HOME%
Il volume nell'unità C è OS

Directory di c:\nwrfcsdk

[.] [..] [bin] [demo] [doc] [include] [lib]
0 File 0 byte

Directory di c:\nwrfcsdk\bin

[.] [..] dev_rfc.log rfcexec.exe startrfc.exe
3 File 50.317 byte

Directory di c:\nwrfcsdk\demo

[.] [..] companyClient.c readme.txt rfcexec.cpp rfcexec.h sapnwrfc.ini sflightClient.c sso2sample.c
startrfc.cpp startrfc.h stfcDeepTableServer.c ThroughputSample.c
11 File 126.438 byte

Directory di c:\nwrfcsdk\doc

[.] [..] licenses.txt release_notes.txt
2 File 33.465 byte

Directory di c:\nwrfcsdk\include

[.] [..] sapdecf.h sapnwrfc.h sapucrfc.h
3 File 523.887 byte

Directory di c:\nwrfcsdk\lib

[.] [..] icudt50.dll icuin50.dll icuuc50.dll libicudecnumber.dll libsapucum.dll libsapucum.lib sapnwrfc.dll sapnwrfc.lib
sapnwrfc.pdb
9 File 48.934.614 byte
Totale file elencati:
28 File 49.668.721 byte

C:\Users\sbarzaghi\Documents\test-node-rfc>node -v
v11.6.0

C:\Users\sbarzaghi\Documents\test-node-rfc>node

const rfcClients = require("node-rfc");
Error: Impossibile trovare il modulo specificato.
\?\C:\Users\sbarzaghi\Documents\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:750:18)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (C:\Users\sbarzaghi\Documents\node_modules\node-rfc\lib\wrapper\sapnwrfc-client.js:6:15)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:22:18)

@sbarzaghialteaup
Copy link
Author

Hi,

Solved copying the file vcruntime140_1.dll into C:\nwrfcsdk\lib
image

@bsrdjan
Copy link
Contributor

bsrdjan commented Mar 17, 2020

Yes, thet should be the DLL mentioned in prerequisites. Can you confirm that rfcexec.exe works without it?

@sbarzaghialteaup
Copy link
Author

Hi,

The prerequisite at https://github.com/SAP/node-rfc and note 2573790 is:
"Visual C++ Redistributable Packages for Visual Studio 2013"

I had already this package installed on my system.

Using process monitor I get this:
image

Copied the missing file from another program folder (microsoft teams) and now it's fine.

Yes, rfcexec.exe works without it.

Thank you
Sam

@bsrdjan
Copy link
Contributor

bsrdjan commented Mar 17, 2020

On a fresh new Windows 10 system, with Visual C Redistributable 2013 installed, the file is present both in Windows\System and in VC Redistributable:
Screenshot 2020-03-17 at 13 38 38

I also tested and rfcexec.exe works without this file but node-rfc not, good to know.

The VC runtime re-installation should normally fix missing files, otherwise fresh new Windows installation. There are similar problems reported by users who previously uninstalled older VC runtimes or similar Microsoft SDKs, before installing the newer one.

@bsrdjan bsrdjan closed this as completed Mar 17, 2020
@sbarzaghialteaup
Copy link
Author

Hi,

I reinstalled the VC runtime 2013, repair options but no resolved.

Thank you for support
Sam

@bsrdjan
Copy link
Contributor

bsrdjan commented Apr 7, 2020

The repair and reinstallation do not always work on Windows. Users spend hours and days sometimes trying to make it work that way and finish with Windows re-installation. You may try with Windows trial fresh new install first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants