IBM Support

IBM i NODEJS: Troubleshooting Recommendations



Nodejs for the IBM i is an open source product included in 5733OPS. Downloadable from Entitled System Support: 5733OPS F_MULTI_NLV_110_IBM_i_Open_Source_Solutions Current versions: node to v0.10.35 npm to v1.4.28 This documentation will provide some error codes and solutions for those using Nodejs for IBM i.

Resolving The Problem


Nodejs for IBM i was released in January 2015. This open source software can be obtained from 5733OPS media. For additional information about Nodejs can be found in DCF N1020583 Nodejs Common Questions & Basic Facts: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Nodejs Common Questions & Basic Facts.'

List of common errors and solutions:

  • - Error: Cannot find module

    This error is typically due to the location of your .js file.

    Running PASE and initiating command node test.js causing error "cannot find module"

    Solution:  Ensure that the file location in the stated command does exist. Typically it is easier to place your .js file in the same folder as the <Node Root>/bin folder. However you can provide the exact location in the CL as well example:  node /home/myfolder/test.js.

  • - Error: 001-0078 Process ended by signal 5

    This is typically due to the attempting to run Nodejs in QShell (STRQSH) rather than PASE.

    PASE commands entered npm -v and node -v both giving out error qsh:001-0078 Process ended by signal 5.

    Solution: Use PASE (call qp2term) rather than QShell for Nodejs scripts. You may attempt to change system value QIBM_MULTI_THREADED to 'Y' and test if you must use QShell.

  • - Error: Unexpected string

    This normally is due to invalid or incorrect string variables assigned inside of the .js script being called by Nodejs.

    Running PASE and invoking node test4.js command. This  returns unexected string error.

    Solution: Verify that you have used the correct values for your string variables.

  • - Error: Object xxxx has no method 'xxxx'

    Nodejs can invoke calls from installed packages (add-ons). There are standard add-ons included with Nodejs and these packages will attempt to call functions within those packages. If you attempt to call an invalid or erroneous (syntax error) functions you may receive this error.

    Running PASE and invoking node test.js command then causes Object class error for an unknown method given.

    Solution: Review the function that is being called and verify that function is indeed included with the API that is being used inside of Nodej. For a list of APIs you can review:


    This error occurs typically when attempting to have a Nodejs application connect to a back end DB2 database using XML services.

    PASE command test.js executed and SQLSTATE=42705 SQLCODE--950 and database G

    Solution: Verify that we have these PTF installed on the System i:

      iOS VersionPTFProductDescription
    If applying the PTF is not possible, running call QHTTPSVR/QPZ1XS13 can also overlay the XMLSERVICE tables which are missing.

  • - Error: listen EADDRINUSE

    This issue is caused by either the port or IP already being in use with an existing connection.

    Executing node serverssl.js command while in PASE thus causing listen EADDRINUSE error.
    Solution: Verify that your application isn't already running in a different PASE session. You can adjust your IP and port listener by editing your .js script:


      app.listen(80, '');



    In this example we are using port 80 for IP

  • - Error: Dependent module /usr/lib/libcrypto.a( could not be loaded.

    Nodejs is depended on SSH libraries to function properly.

    PASE command node -v and npm -v both fail with 0590-150 and 0590-152 error because of missing libcrypto.a library files.

    Solution: Ensure that PTF SI55522 has been installed and in good status. This normally is included with 5770DG1 groups (level 31). If the HTTP groups has not been applied since the install of 5733OPS, it is recommended that you reapply the HTTP groups. Verify in WRKPTFGRP if an IPL is required.

    For more information review DCF N1020583 Nodejs Common Questions & Basic Facts: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Nodejs Common Questions & Basic Facts.'

  • - Unexpected response:[1G [0J> [3G

    This does not specify an error. However, verify the command you are using to invoke the "node" command.

    While in PASE we attempt node command and recieve not an error but response [1G  [0J>    [3G

    Solution: If attempting command "node -v" and you are receiving this error, we recommend that you verify PTF SI55763 for 5733OPS has been properly installed. If not ensure that you do have the latest HTTP groups applied as it is included in level 32 of the HTTP group.

    For more information review DCF N1020583 Nodejs Common Questions & Basic Facts: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Nodejs Common Questions & Basic Facts.'

  • - Additional Considerations:

    Node as well the npm command uses temporary folders inside your /home/yourprofile/.npm/. You may find it helpful to clear out folder .npm folder and .rnd file when attempting to troubleshoot issues with node.js or npm.js commands. (The .rnd file may not exist. This file can be used by OpenSSL as well as the npm command.)

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"General Information","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.2.0;7.2;7.1.0;7.1","Edition":"Standard","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Product":{"code":"SSC5L9","label":"IBM i 7.2"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":" ","Platform":[{"code":"","label":null}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}},{"Product":{"code":"SSC52E","label":"IBM i 7.1"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":" ","Platform":[{"code":"","label":null}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

Product Synonym


Document Information

Modified date:
18 December 2019