iris.node not found

Primary tabs

I followed the instructions in the documentation https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls... (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.

  • + 1
  • 1
  • 54
  • 9
  • 2

Answers

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

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.

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)

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.

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.

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)

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

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.