Written by

Software Architect at Visum
Question Yuri Marx · Jan 3, 2019

iris.node not found

I followed the instructions in the documentation https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl… (Install iris.node on nodejs for windows). Procedures made:

=> Copy iris.node to the location specified in the NODE_PATH environment variable: C:\Program Files\nodejs

=> I used: var irisobj = require('iris') on my js file

But is not work. Error: The specified procedure could not be found.

Comments

Ward De Backer · Jan 3, 2019

The instructions in the docs are different from the usual place a node.js module like iris.node should be put.

Usually, you create a test.js file in a directory of your choice, e.g. in C:\Test and inside this directory, you create a C:\Test\node_modules directory where iris.node should be placed.

When you do:

var iris = require('iris')

Your test.js file will look for it inside node_modules.

0
Yuri Marx  Jan 3, 2019 to Ward De Backer

Did not work:

Error: Não foi possível encontrar o procedimento especificado.
\\?\C:\projetos\curso-react-native\tasks-backend\node_modules\iris.node
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Server.app.listen (C:\projetos\curso-react-native\tasks-backend\index.js:7:19)
    at Object.onceWrapper (events.js:273:13)
    at Server.emit (events.js:182:13)
    at emitListeningNT (net.js:1324:10)

0
Ward De Backer  Jan 3, 2019 to Yuri Marx

A few more things to check: 

  • when you installed Node.js version 10.x, you need iris1000.node (for version 8.x, you need iris800.node)
  • you can ask for the most recent build via WRC
  • the IRIS architecture version (x86 or x64) must match the iris.node architecture version

If the module still refuses tot load, I'll upload an example test.js file I use myself to test basic functionality.

0
Yuri Marx  Jan 3, 2019 to Ward De Backer

I checked all, but remains refusing

0
Yuri Marx  Jan 4, 2019 to Ward De Backer

Same error. My error was in the var iris = require('iris'); line.

0
Ward De Backer  Jan 4, 2019 to Yuri Marx

Very strange - did the test script work on your machine from the example zip?

When I look at the error you post: is the path in db.open() method pointing to:

path:"C:\\InterSystems\\IRIS\\Mgr"

It must point to the Mgr directory.

0
Yuri Marx  Jan 4, 2019 to Ward De Backer

internal/modules/cjs/loader.js:718
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: Não foi possível encontrar o procedimento especificado.
\\?\c:\teste\node_modules\iris.node
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (c:\teste\iristest.js:1:74)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)

0
Yunier Gonzalez  Jul 17, 2019 to Yuri Marx

Hello, I have the same error, you managed to find a solution? Thank you

0
Yuri Marx  Jul 17, 2019 to Yunier Gonzalez

The solution was use Linux, that's worked fine.

0
Ward De Backer  Jan 4, 2019 to Yuri Marx

This is a basic test script I'm using to test basic connectivity from Node.js v8.x, the iris.node module version included is meant for an IRIS x64 instance on Windows with Node.js v8.x x64 installed.

It contains everything you need, you can immediately run it - you should see the same results. The test script assumes IRIS is installed in C:\InterSystems\IRIS and the _SYSTEM user contains the default password. If not, you need to change this in the example script iristest.js in the db.open() parameters.

iris_node_connector_test.zip

IRIS Node.js connector test script

Btw, if you're developing a React Native app and you need a back-end server for IRIS, you can try the react-qewd module for Node.js for use with the QEWD.js back-end server for IRIS.

0
Yuri Marx · Jan 4, 2019

Your procedures worked fine on Linux. On windows persists the errors. I will use a VM with Linux. Thanks, your support was great Ward.

0