Giter VIP home page Giter VIP logo

Comments (8)

bsrdjan avatar bsrdjan commented on August 14, 2024 1

Glad to hear it works. Will try to improve the error message when sap libs loading fails.

Please feel free to use the @next version, works quite stable and has more improvements.

from node-rfc.

bodyrock avatar bodyrock commented on August 14, 2024 1

I had this issue on an AMD image. I switched to an intel based image and the error went away.

from node-rfc.

bsrdjan avatar bsrdjan commented on August 14, 2024

Does the error happen during or after installation, when running some test script for example?

Could you please post the nodejs version and how to reproduce the issue (steps before the error happens) ?

from node-rfc.

bsrdjan avatar bsrdjan commented on August 14, 2024

Please also check the npm version. The npm upgrade fixed the installation issue I had with node 6.x: https://npm.community/t/enotempty-directory-not-empty-rename-on-nodejs-6-only/513/2

from node-rfc.

aaronortiz avatar aaronortiz commented on August 14, 2024

Hello bsrdjan, could you please help?

I can confirm jimmymain's error. I installed node-rfc using npm without errors, but when I run the example code, I get exactly the same message:

 node test.js
module.js:681
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: The specified module could not be found.
\\?\C:\Users\aortiz30\OneDrive - DXC Production\HPE\Xiba\msbot\xiba\node_modules\node-rfc\lib\binding\win32-x64-node-v57\sapnwrfc.node
    at Object.Module._extensions..node (module.js:681:18)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\aortiz30\OneDrive - DXC Production\HPE\Xiba\msbot\xiba\node_modules\node-rfc\lib\wrapper\sapnwrfc-client.js:7:17)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\aortiz30\OneDrive - DXC Production\HPE\Xiba\msbot\xiba\node_modules\node-rfc\lib\index.js:6:10)
    at Module._compile (module.js:652:30)

My versions are:

$ npm --versions
{ npm: '6.4.0',
  ares: '1.10.1-DEV',
  cldr: '32.0',
  http_parser: '2.8.0',
  icu: '60.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.32.0',
  node: '8.11.3',
  openssl: '1.0.2o',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.19.1',
  v8: '6.2.414.54',
  zlib: '1.2.11' }

My code:

"use strict";

var rfc = require('node-rfc');

var connParams = {
  "user": "60095751",
  "passwd": "not-my-real-password",
  "ashost": "saplh3.sapnet.hp.com",
  "sysnr": "10",
  "client": "200",
  "lang": "EN"
};

var client = new rfc.Client(connParams, true);

console.log('Client Version: ', client.getVersion());

console.log('Connecting...');
client.connect(function(err) {
  if (err) {
    return console.error('could not connect to server', err);
  }

  console.log('Invoking STFC_CONNECTION');
  client.invoke('STFC_CONNECTION',
    { REQUTEXT: 'H€llö SAP!' },
    function(err, res) {
      if (err) {
        return console.error('Error invoking STFC_CONNECTION:', err);
      }
      console.log('Result STFC_CONNECTION:', res);
    });


  var importStruct = {
    RFCFLOAT: 1.23456789,
    RFCCHAR1: 'A',
    RFCCHAR2: 'BC',
    RFCCHAR4: 'DEFG',

    RFCINT1: 1,
    RFCINT2: 2,
    RFCINT4: 345,

    RFCHEX3: 'fgh',

    RFCTIME: '121120',
    RFCDATE: '20140101',

    RFCDATA1: '1DATA1',
    RFCDATA2: 'DATA222'
  };
  var importTable = [importStruct];

  console.log('Invoking STFC_STRUCTURE');
  client.invoke('STFC_STRUCTURE',
    { IMPORTSTRUCT: importStruct, RFCTABLE: importTable },
    function(err, res) {
      if (err) {
        return console.error('Error invoking STFC_STRUCTURE:', err);
      }
      console.log('Result STFC_STRUCTURE:', res);
  });

});

from node-rfc.

bsrdjan avatar bsrdjan commented on August 14, 2024

Error in module loader (process.dlopen(module ...) usually indicates that SAP NW RFC SDK libraries cannot be loaded. In most cases the DLL files (SO on Linux) are either nor installed or not on path where the loader looks for them.

On Windows, SAP NW RFD SDK DLLs must be on system or user PATH and they should be 64 bit libs if you use 64 bit system. Sometimes people download and unpack 32 bit SDK (SAP filenames here are cryptic). Did you check that?

from node-rfc.

aaronortiz avatar aaronortiz commented on August 14, 2024

In most cases the DLL files (SO on Linux) are either nor installed or not on path where the loader looks for them.

I just needed to restart my machine for the path variables to be reset. It is working now.

thanks!

Aaron Ortiz

from node-rfc.

bsrdjan avatar bsrdjan commented on August 14, 2024

Fixed in NAPI: 3502f48 482cc58

from node-rfc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.