PaulWieland/node-red-contrib-saprfc

The specified module was not found

Closed this issue · 5 comments

I was able to install the saprfc module successfully. Unfortunately, this error message always appears when starting Node-Red. Do you have any idea what it could be?

Welcome to Node-RED

15 Jan 14:01:36 - [info] Node-RED version: v3.1.3
15 Jan 14:01:36 - [info] Node.js version: v20.11.0
15 Jan 14:01:36 - [info] Windows_NT 10.0.19045 x64 LE
15 Jan 14:01:37 - [info] Loading palette nodes
15 Jan 14:01:38 - [warn] ------------------------------------------------------
15 Jan 14:01:38 - [warn] [node-red-contrib-saprfc/saprfc] Error: Das angegebene Modul wurde nicht gefunden.
\?\C:\Users\RS\AppData\Roaming\npm\node_modules\node-red-contrib-saprfc\node_modules\node-rfc\build\Release\sapnwrfc.node
environment: {
"platform": {
"name": "win32",
"arch": "x64",
"release": "10.0.19045"
},
"env": {
"SAPNWRFC_HOME": "C:\nwrfcsdk",
"RFC_INI": "",
"nwrfcsdk_lib_on_path": true
},
"versions": {
"node": "20.11.0",
"acorn": "8.11.2",
"ada": "2.7.4",
"ares": "1.20.1",
"base64": "0.5.1",
"brotli": "1.0.9",
"cjs_module_lexer": "1.2.2",
"cldr": "43.1",
"icu": "73.2",
"llhttp": "8.1.1",
"modules": "115",
"napi": "9",
"nghttp2": "1.58.0",
"nghttp3": "0.7.0",
"ngtcp2": "0.8.1",
"openssl": "3.0.12+quic",
"simdutf": "4.0.4",
"tz": "2023c",
"undici": "5.27.2",
"unicode": "15.0",
"uv": "1.46.0",
"uvwasi": "0.0.19",
"v8": "11.3.244.8-node.17",
"zlib": "1.2.13.1-motley-5daffc7"
}
}

15 Jan 14:01:38 - [warn] ------------------------------------------------------
15 Jan 14:01:38 - [info] Settings file : C:\Users\RS.node-red\settings.js
15 Jan 14:01:38 - [info] Context store : 'default' [module=memory]
15 Jan 14:01:38 - [info] User directory : \Users\RS.node-red
15 Jan 14:01:38 - [warn] Projects disabled : editorTheme.projects.enabled=false
15 Jan 14:01:38 - [info] Flows file : \Users\RS.node-red\flows.json
15 Jan 14:01:38 - [info] Creating new flow file
15 Jan 14:01:38 - [warn]


Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

15 Jan 14:01:38 - [warn] Encrypted credentials not found
15 Jan 14:01:38 - [info] Server now running at http://127.0.0.1:1880/
15 Jan 14:01:38 - [info] Starting flows
15 Jan 14:01:38 - [info] Started flows

It seems the node-red-contrib-saprfc cannot find the node-rfc module. Do you have a fully functional node-rfc installation?

I'm beginning to understand the connections. No, the installation of node-rfc fails with the following message:

PS C:\Windows\system32> npm i node-rfc
npm ERR! code 1
npm ERR! path C:\Windows\system32\node_modules\node-rfc
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp-build
npm ERR! MSBUILD : error MSB1009: Die Projektdatei ist nicht vorhanden.
npm ERR! Schalter: build\binding.sln
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@20.11.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.11.4 found at "C:\Users\RS\AppData\Local\Programs\Python\Python311\python.exe"
npm ERR! gyp info find VS using VS2019 (16.11.34301.259) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\RS\AppData\Local\Programs\Python\Python311\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Windows\System32\node_modules\node-gyp\gyp\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Windows\system32\node_modules\node-rfc\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Windows\System32\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\RS\AppData\Local\node-gyp\Cache\20.11.0\include\node\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\RS\AppData\Local\node-gyp\Cache\20.11.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Windows\System32\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\RS\\AppData\\Local\\node-gyp\\Cache\\20.11.0\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Windows\system32\node_modules\node-rfc',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\Windows\system32\node_modules\node-rfc\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'build\binding.sln',
npm ERR! gyp info spawn args '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args '/nologo',
npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess. (C:\Windows\System32\node_modules\node-gyp\lib\build.js:209:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:518:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Windows\System32\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Windows\system32\node_modules\node-rfc
npm ERR! gyp ERR! node -v v20.11.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\RS\AppData\Local\npm-cache_logs\2024-01-15T14_57_18_320Z-debug-0.log

The installation worked. The following update was still missing for the SDK to work properly:

https://support.microsoft.com/de-de/topic/update-f%C3%BCr-visual-c-2013-und-visual-c-redistributable-paket-5b2ac5ab-4139-8acc-08e2-9578ec9b2cf1

Unfortunately I am now missing the config node. Do you have any idea what the problem could be? Everything else works without any problems.

image

Node RED config nodes are inside the properties panel of the regular nodes.. Drag a read table node in and double click it, then add your sap connection info.

Ah very good, I've found it.

Many thanks for your help