Troubleshooting
Problem
Nodejs for the IBM i is an open source product included in 5733OPS. Downloadable from Entitled System Support: http://www-304.ibm.com/servers/eserver/ess/index.wss 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
NOTICE: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
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:

List of common errors and solutions:
-
Error: Cannot find module
This error is typically due to the location of your .js file.
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.
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: 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.
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: http://nodejs.org/api/
-
Error: SQLSTATE=PAERR SQLCODE=-1
This error occurs typically when attempting to have a Nodejs application connect to a back end DB2 database using XML services.
Solution: Verify that we have these PTF installed on the System i:
iOS Version PTF Product Description V7R2 SI56287 5770DG1 OSP-DB CREATE XMLSERVICE PROCEDURES V7R1 SI56296 5770DG1 OSP-DB CREATE XMLSERVICE PROCEDURES
-
Error: listen EADDRINUSE
This issue is caused by either the port or IP already being in use with an existing connection.
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:
Example
app.listen(80, '192.168.0.101');
or
http.createServer(onRequest).listen(80,'192.168.0.101');
In this example we are using port 80 for IP 192.168.0.101.
-
Error: Dependent module /usr/lib/libcrypto.a(libcryto.so.1) could not be loaded.
Nodejs is depended on SSH libraries to function properly.
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:
-
Unexpected response:[1G [0J> [3G
This does not specify an error. However, verify the command you are using to invoke the "node" command.
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:
-
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 Synonym
NODEJS;TROUBLESHOOTING;ERROR
Document Information
Modified date:
18 December 2019
UID
nas8N1020591