Closed chforster closed 5 years ago
Could you please use the node-rfc@next because node-rfc is not supported on node 10.
When using node-rfc@next the npm install
works, but afterwards I receive the following Error:
/home/root/node_modules/node-rfc/lib/wrapper/sapnwrfc-client.js:26
throw ex;
^
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/root/node_modules/node-rfc/lib/binding/linux-x64-node-v64/sapnwrfc.node)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:730:18)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/home/root/node_modules/node-rfc/lib/wrapper/sapnwrfc-client.js:9:15)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/home/root/node_modules/node-rfc/lib/index.js:6:10)
at Module._compile (internal/modules/cjs/loader.js:701:30)
Could you please share the Linux version/release you are using? Is it a docker image and which one?
It's a Docker-Container running on Docker version 18.09.5.
Here's my first draft of the Dockerfile:
FROM node:10-jessie
COPY nwrfcsdk /usr/local/sap/nwrfcsdk
COPY nwrfcsdk.conf /etc/ld.so.conf.d/nwrfcsdk.conf
COPY src/ /home/root/
WORKDIR /home/root
ENV SAPNWRFC_HOME=/usr/local/sap/nwrfcsdk
RUN /sbin/ldconfig
RUN npm install node-rfc@next
The js file I try to execute afterwards is just a connection attempt which worked when using node-rfc (0.16):
var client = new rfc.Client({'user': 'user', 'passwd': 'pwd', 'ashost': '10.0.0.1', 'sysnr': 'x01', 'client': '001'});
client.connect(function(err, res) { // and connect
if (err) { // check for login/connection errors
return console.error('could not connect to server', err);
}
docker node images are based on older GLIBC versions and node-rfc must be built from source on them (see #35).
The npm install --build-from-source node-rfc@next
should work but for some reason it doesn't. Just tested and need some time to investigate why.
In the meantime, attached sapnwrfc.node should help, just unpack and require('sapnwrfc.node')
.
npm install node-rfc@next --no-bin-links
works now also in node:10-jessie containers.
The --no-bin-links
required for now, because of npm issues.
Perfect, thx. Will try it asap. The attached sapnwrfc.node you posted before worked also.
@bsrdjan : I just tried to install rc10 within my Docker-Container:
npm install node-rfc@next --no-bin-link
When calling my connection-function I still receive the error
/root/node_modules/node-rfc/lib/wrapper/sapnwrfc-client.js:16
throw ex;
^
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /root/node_modules/node-rfc/lib/binding/linux-x64-node-v64/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:730:18)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/root/node_modules/node-rfc/lib/wrapper/sapnwrfc-client.js:9:15)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/root/node_modules/node-rfc/lib/index.js:6:10)
at Module._compile (internal/modules/cjs/loader.js:701:30)
When building from source it works npm install --build-from-source node-rfc@next
When performing a "npm install node-rfc" I receive the following Error:
The Binary Path provided in package.json is not valid anymore. You should take "https://github.com/SAP/node-rfc/releases/tag/" instead of "https://github.com/sap/node-rfc/releases/download/"