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

env variable SAPNWRFC_HOME read wrong on Windows 2016 #237

Closed
uwehommel opened this issue Oct 21, 2021 · 5 comments
Closed

env variable SAPNWRFC_HOME read wrong on Windows 2016 #237

uwehommel opened this issue Oct 21, 2021 · 5 comments

Comments

@uwehommel
Copy link

Describe the bug
there is always an additional / when the environment variable is red in Node-Red
configure as C:/nwrfcsdk

only in Node Red it is reported as C://nwrfcsdk and therefore the sdk cannot be loaded

To Reproduce
Describe how the node-rfc is installed, like locally or globally and using npm install or build from source.

Describe steps to reproduce the behavior, including the test script.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment

  • The output of node -p "require('node-rfc').environment"

Additional context
Add any other context about the problem here.

@bsrdjan
Copy link
Contributor

bsrdjan commented Oct 21, 2021

only in Node Red it is reported as C://nwrfcsdk and therefore the sdk cannot be loaded

Where it is reported?

What are the steps to reproduce?

@uwehommel
Copy link
Author

Node-rfc is installed via
npm install node-rfc

image
set environment variable to SAPNWRFC_HOME to C:\nwrfcsdk

if I do echo %SAPNWRFC_HOME% it shows C:\nwrfcsdk
image

If I do node -p "require('node-rfc').environment"

it shows "SAPNWRFC_HOME": "C:\nwrfcsdk",

here the complete message:
Error: The specified module could not be found.
\?\C:\Users\Administrator\node_modules\node-rfc\lib\binding\sapnwrfc.node

The SAP NW RFC SDK could not be loaded, check the installation: https://github.com/SAP/node-rfc/blob/master/doc/installation.md#sap-nwrfc-sdk-installation
environment: {
"platform": {
"name": "win32",
"arch": "x64",
"release": "10.0.14393"
},
"env": {
"SAPNWRFC_HOME": "C:\nwrfcsdk",
"RFC_INI": "",
"nwrfcsdk_lib_on_path": true
},
"versions": {
"node": "14.15.5",
"v8": "8.4.371.19-node.18",
"uv": "1.40.0",
"zlib": "1.2.11",
"brotli": "1.0.9",
"ares": "1.16.1",
"modules": "83",
"nghttp2": "1.41.0",
"napi": "7",
"llhttp": "2.1.3",
"openssl": "1.1.1i",
"cldr": "37.0",
"icu": "67.1",
"tz": "2020a",
"unicode": "13.0"
}
}

at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:\Users\Administrator\node_modules\node-rfc\lib\wrapper\noderfc-bindings.js:36:49)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:\Users\Administrator\node_modules\node-rfc\lib\index.js:16:14)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)

@uwehommel uwehommel reopened this Oct 22, 2021
@uwehommel
Copy link
Author

sorry closed it instead of saving

@uwehommel
Copy link
Author

weird in copy and paste it shows only one
here the snip where it shows two including the error message not found
image

Error: The specified module could not be found.
\?\C:\Users\Administrator\node_modules\node-rfc\lib\binding\sapnwrfc.node

The SAP NW RFC SDK could not be loaded, check the installation: https://github.com/SAP/node-rfc/blob/master/doc/installation.md#sap-nwrfc-sdk-installation
environment: {
"platform": {
"name": "win32",
"arch": "x64",
"release": "10.0.14393"
},
"env": {
"SAPNWRFC_HOME": "C:\nwrfcsdk",
"RFC_INI": "",
"nwrfcsdk_lib_on_path": true
},
"versions": {
"node": "14.15.5",
"v8": "8.4.371.19-node.18",
"uv": "1.40.0",
"zlib": "1.2.11",
"brotli": "1.0.9",
"ares": "1.16.1",
"modules": "83",
"nghttp2": "1.41.0",
"napi": "7",
"llhttp": "2.1.3",
"openssl": "1.1.1i",
"cldr": "37.0",
"icu": "67.1",
"tz": "2020a",
"unicode": "13.0"
}
}

@bsrdjan
Copy link
Contributor

bsrdjan commented Feb 6, 2022

Sorry for the pending response here. The '\' is standard output representation on Windows (esc character + folder separator).

The reason why node-rfc is not loading is because the node-rfc and SAP NWRFC SDK are not supported on Node-RED platform. See: #161 and #148

The node-rfc README section about Node-RED will be updated, pointing to these feature requests.

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

No branches or pull requests

2 participants