-
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
NW.js and Electron platforms support #144
Comments
You may need to run the following, if nw does not install automatically: npm install [email protected] |
It happens on Windows only. Please feel free to try workarounds mentioned in napi#269, until the solution found. |
Thanks a lot for your feedback. I went through the topic and found that one of the add-on developers could resolve this problem in his add-on a couple of days ago. I have asked him to update on the root cause, lets wait and see if it is applicable for node-rfc. |
He answered in the thread above, please have a look if you see any hints... I tried step 2 from workaround below, but no result. Can you apply step 1 from your side? I also opened a new issue on their page based on your message, as the topic above was already closed and there is no guarantee that they will consider further activities of a closed topic. |
I tried step 1 alone and it did not help but both steps together could eventually make a difference. Where exactly did you add the step 2 ? The step 1 requires one line insert into target_link_options(${PROJECT_NAME} PUBLIC
/NXCOMPAT
/SWAPRUN:NET
/OPT:REF
/NOLOGO
/LTCG
/DELAYLOAD:node.exe
) You can add the line and build sapnwrfc.node from source, running Here the Windows build with step 1 only: sapnwrfc.node.zip |
But still it gives me an error :( What am I doing wrong? My Node,js version is 14.2.0 |
I also tried with Node 12.13.0 as you do -- but still an error. My Windows 10 version is 1909 What is your VS version? |
I am using VS2019 and used Node 12.13.0 because that version used in Electron 8. |
Why NW.js is mentioned if initial/top comment, when the issue is about Electron? |
I first faced this issue in NW.js, then tried in Electron and got same error there. For now both of them don't work for me.
I realized that you attached a build only with step 1. Can you please attach a build that worked for you on Windows 10 (after both steps applied)? |
Sorry, no build worked for me on Windows and I did not test NW. Please have a look into Electron documentation and try if any of methods described there eventually work for you? None of them worked for me and I asked prebuild and Electron teams for help: |
I've been struggling with this issue for about a week and have tested all possible methods including this... Ok, thanks for contacting with other teams! |
I'm getting the same error with zeit/pkg. |
Hi, Unfortunately no updates so far... |
Also getting the error with zeit/pkg.. are there any updates? Edit: Placed win_delay_load_hook.cc under ./src Here is a gist of the updated files |
Tested again on Windows 10, with SAP NWRFC SDK 7.50 PL7 and node-rfc 2.3.0 and the same issue occurs. The Process Monitor shows SDK libraries are found and for some reason still not loaded: Although it works on Linux and MacOS, the SAP NWRFC SDK is not supported on Electron platform. You may create SAP feature request for If you create the request, please share the link here. |
I solve this by
CMAKE_JS_LIB contains also follow cmake Include N-API wrappers section
so I think here is 3 key points:
these mentioned in electron's document and cmake-js's readme but they don't provide a full example. also I'd mention I literally set |
@bung87 just to confirm: you getting node-rfc running in Electron? I keep getting the error message Looks like https://github.com/SAP/node-rfc/blob/main/CMakeLists.txt has already partly been adapted based on your remarks? Could you though provide a working example of My Node.js environment:
My Electron environment (v15.1.2):
|
Could you please try with [email protected] addition: and with updated test case: SAP-samples/node-rfc-samples/frameworks/electron-quick-start |
Electron is supported as of [email protected], also on Windows |
Hi Team,
There is an issue when running node-rfc with NW.js or Electron on Windows 10. After running "npm start" it throws an error:
Uncaught Error: A dynamic link library (DLL) initialization routine failed.
?\C:\Storage\code\nwjs-hands-on\node_modules\node-rfc\lib\binding\sapnwrfc.node
It is easy to reproduce, just download my ready to run codes, npm install, and npm start - you will get the error in Dev tools console.
nwjs-hands-on.zip
I have tried rebuilding node-rfc with MSVS 2012, 2013, 2015, 2017, 2019 - none of them helped.
Command I used is:
npm install node-rfc --build-from-source --runtime=node-webkit --target=0.45.5 --target_arch=x64
On the other hand node-rfc works perfectly with Node.js app on the same Windows 10 machine.
What exact Visual Studio version do you use to compile C/C++ codes for this module?
Any ideas how to proceed further?
The text was updated successfully, but these errors were encountered: