Closed nonoll closed 1 year ago
I'm not good at English. It was written using a translator.
Is your feature request related to a problem? Please describe.
path.resolve(__dirname, "..")
. ├── .next ├── rfc.js └── node_modules └── node-rfc
Describe alternatives you've considered
noderfc-bindings.ts
try { const hasEnvValue = typeof process.env.NODE_RFC_MODULE_PATH !== "undefined"; const modulePath = hasEnvValue ? process.env.NODE_RFC_MODULE_PATH : path.resolve(__dirname, ".."); // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-var-requires noderfc_binding = require("node-gyp-build")(modulePath) as NWRfcBinding; } catch (ex) { // ... }
# .env NODE_RFC_MODULE_PATH=./node_modules/node-rfc
$ NODE_RFC_MODULE_PATH=./node_modules/node-rfc node rfc-execute.js
{ platform: { name: 'darwin', arch: 'x64', release: '22.4.0' }, env: { SAPNWRFC_HOME: '/usr/local/sap/nwrfcsdk', RFC_INI: '' }, versions: { node: '16.20.1', v8: '9.4.146.26-node.26', uv: '1.43.0', zlib: '1.2.11', brotli: '1.0.9', ares: '1.19.1', modules: '93', nghttp2: '1.47.0', napi: '8', llhttp: '6.0.11', openssl: '1.1.1u+quic', cldr: '41.0', icu: '71.1', tz: '2022f', unicode: '14.0', ngtcp2: '0.8.1', nghttp3: '0.7.0' }, noderfc: { version: '3.2.0', nwrfcsdk: { major: 7500, minor: 0, patchLevel: 12 } } }
included in v3.3, thanks!
Is your feature request related to a problem? Please describe.
path.resolve(__dirname, "..")
: Cannot find path 'node_modules/node-rfc' depending on the execution locationDescribe alternatives you've considered
noderfc-bindings.ts
noderfc.envrionment