-
Notifications
You must be signed in to change notification settings - Fork 74
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
Getting Error: sapnwrfc.node is not a valid Win32 application. #284
Comments
The output of "nwrfcsdk_lib_on_path": false It should be fixed by adding |
Can you do the following test and post the output cd \nwrfcsdk\bin
rfcexec |
After running the command I am getting a pop-up which says "The code execution cannot proceed because MSVCP120.dll was not found. reinstalling the program may fix this problem". |
Microsoft C Runtime DLLs version 12.0 (Visual C++ 2013) is a prerequisite for SAP NWRFC SDK. Is it installed on your system? |
it is correct output installation.md#verify-sap-nwrfc-sdk-installation The node-rfc should work as well :) |
Can you run the Windows Process monitor, to check which library exactly fails to load? Just start the Process Monitor and run the following command to reproduce. Similar issue discussed here: #115 (comment) node -p "require('c:\node-rfc\node_modules\node-rfc\lib\binding\sapnwrfc.node')" |
can you find |
I could not find the sapnwrfc.dll and apart from the SUCCESS there is only BUFFER OVERFLOW and NAME NOT FOUND. |
No idea what could be the problem. Are you using standard Windows system ? Which version/edition? I just tested as follows:
npm init -y
npm install node-rfc
node -p "require('node-rfc')" Can you check if cd ... to sapnwrfc.node folder
node -p "require('./sapnwrfc.node')" Fresh new install should work. Some users (years ago) reported that was the only solution for them after MC C++ DLLs installed after some other libraries. |
Something is apparently wrong with the installation:
Could you please create fresh new folder and post the full log mkdir test
cd test
npm init -y
# show SAPNWRFC_HOME and PATH
echo $env:SAPNWRFC_HOME
echo $env:PATH
# or echo %PATH% ...
npm install node-rfc
node -p "require('node-rfc')" Are you using some sort of "special" Windows installation, like running in virtual machine or similar hosted environment? Could you please also check the file type of sapnwrfc.node, using TrID or similar Windows utility ? |
Thank you @CodingQueries2023. Could you please also post the full console output as per my last comment mkdir test
cd test
npm init -y
npm install node-rfc Also
|
I can check, could you please attach your Also run |
The executable file format can be determined also by prefix shown in plain text editor, like notepad.exe. The prefix of your sapnwrfc.node is ELF and for Windows it should be MZ. Also the size of that Linux sapnwrfc.node differs from what is shipped in latest node-rfc release. Your NPM is apparently configured for custom registry, getting corrupted installation package from there. |
Thank you @bsrdjan for your reply. I can't change the registry but is there a way to get around this and fix the issue? |
only manual workaround. sapnwrfc.node executables for supported platforms are attached to node-rfc GitHub releases. You can
You can also use this sapnwrfc.node.zip for Windows, for node-rfc 2.7.1 It should work but there could be also issues in case the rest of the package from custom registry is older node-rfc version, possibly incompatible with the latest sapnwrfc.node executable. Why not install from standard registry and avoid the risk ? |
looks correct now |
@CodingQueries2023, what type of virtual machine are you using and can you describe how your Windows system is hosted? It could help other users with similar setup if we can find out why Linux binaries are fetched instead of Windows. |
Hi @bsrdjan |
Could you please create another issue for communication error? You can also try node-rfc pre-release 3.0.0-rc.1. The packaging is changed and node-rfc contains binaries for all platforms, not fetching them from Github any more. |
Sure I will create a new issue for communication error |
Describe the bug
I have 64 bit node js installed on my system and have installed 64 bit NWRFC SDK but I am still getting the error "\?\C:...\node_modules\node-rfc\lib\binding\sapnwrfc.node is not a valid Win32 application".
To Reproduce
Describe how the
node-rfc
is installed, like locally or globally and usingnpm install
or build from source.I have installed node-rfc locally from https://www.npmjs.com/package/node-rfc , using the command "npm i node-rfc".
Environment
node -p "require('node-rfc').environment"
The text was updated successfully, but these errors were encountered: