Common issues and solutions
You can find solutions for the following common issues that you might encounter with the Open Enterprise SDK for Node.js runtime.
Node.js fails to run
- Module CXXRT64 was not found
- CEE3559S External variable 'variable name' was not found in DLL CXXRT64
- Not enough storage available to load libnode.*.so
- msgget: EDC5133I No space left on device error when running Node.js
- Node.js abnormally exits
- JavaScript heap out of memory
- CEE3501S The module CRTEQCXS was not found
Encoding issues
Node.js hangs
Node package manager
Native add-ons
Networking
Module CXXRT64 was not found
To resolve this issue, install the Language Environment® PTFs as described in Installing and configuring.
CEE3559S External variable 'variable name' was not found in DLL CXXRT64
To resolve this error, you need to install the Language Environment PTFs as described in Installing and configuring.
$ unset STEPLIB
For details, see CEE3559S External variable variable-name was not found in DLL dll-name.
Not enough storage available to load libnode.*.so
CEE3500S Not enough storage was available to load libnode.<version>.so.
From compile unit ZOSSYSTEM:../src/node_main.cc/ at entry point main at statement 147 at compile unit offset +000000001FE0AA6C at entry offset +000000000000008C at address 000000001FE0AA6C.
This error indicates that the address space size is not sufficient to load
libnode.<version>.so
. At least 300 MB of address space is
needed to load libnode.<version>.so
. You can run /bin/ulimit -A to check the current address space size.
You can increase the address space with the SETOMVS MVS system command SETOMVS MAXASSIZE=2147483647, which sets the address space size to 2 GB.
msgget: EDC5133I No space left on device error when running Node.js
msgget: EDC5133I No space left on device. (errno2=0x07050305)
CEE5207E The signal SIGABRT was received.
Ý1¨ + Done(131) node --version
83951929 Abort /ZOWE/node/node-v8.16.0-os390-s390x/bin/node
This error indicates that you have reached the message queue limit, and you need to set the
__IPC_CLEANUP=1 environment variable to remove the existing message queues and run node
--version
to verify. Message queues are left when the previous Node.js processes do not end
normally. If the node processes end normally, the message queues are cleaned.
You might need to increase the MAX message queue limit (IPCMSGNIDS). For details, see IPCMSGNIDS and IPCSEMNIDS.
Node.js abnormally exits
If your Node.js application spawns several processes, it might have reached the MAXPROCUSER limit. Check your system limits.
Node.js applications require at least 1 GB of memory above the bar. You can check the limit with the /bin/ulimit -M command and increase the MEMLIMIT.
JavaScript heap out of memory
FATAL ERROR: NewSpace::Rebalance Allocation failed - JavaScript heap out of memory
Run
the /bin/ulimit -M command to check the memory above the bar
limit and increase the limit as needed. For details, see MEMLIMIT parameter.--max-old-space-size=<newsizeinmb>
It is
recommended to set newsizeinmb to 4096 or greater, which requires a minimum
MEMLIMIT of 4 GB.CEE3501S The module CRTEQCXS was not found
To resolve this issue, install the compiler runtime PTFs that are described in Installing and configuring.
Node.js outputs garbled characters followed by SyntaxError
path-to-file.js:1
�������K���M}��}]^
SyntaxError: Invalid or unexpected token
$ node --help
Node.js outputs garbled characters
To make Node.js operate correctly, you need to set certain environment variables. Otherwise unreadable characters might be emitted to STDOUT or STDERR.
.env
script that is generated by
setup.sh
to set the required environment variables in the current shell by using
the dot command
(.):$ . <nodejs_dir>/.env
ccsid
tag of
your STDOUT or STDERR TTY:$ chtag -p $SSH_TTY
$ chtag -r $SSH_TTY
$ export NODE_STDOUT_CCSID=1047
$ export NODE_STDERR_CCSID=1047
Integrated Cryptographic Service Facility not started - hang
/dev/random
is
functional:cat /dev/random | od | head
If /dev/random
is not available, ensure that Integrated Cryptographic Service
Facility (ICSF) is started.
Forceful termination
kill -3 <process_id_of_node_process>
The process ID can be obtained by using the ps command.
npm error: FSUM7332 syntax error: got (), expecting Word
When you encounter this error, you need to ensure that lib/node_modules/npm/bin/npm-cli.js is tagged as ISO8859-1.
npm: line 1: syntax error near unexpected token `)'
FSUM7351 not found
node: FSUM7351 not found
Check whether the directory
/usr/bin/env
exists. If not configured, see the instructions in Verifying the env command path.Installing npm on a GitHub repository is not successful
$ npm install <github_repo_url>#branch
clang-14: error: unknown argument: '-qascii'
$HOME/.npm
directory or the
$HOME/.node-gyp
directory. To resolve this issue, run the following commands to
remove the cached directories:$ rm -rf $HOME/.npm
$ rm -rf $HOME/.node-gyp
Compiler errors related to header files under /usr/include
If you encounter errors for header files under /usr/include during compilation, the cause might be that the required PTFs are not installed on your system. Check software prerequisites in Installing and configuring.
node_api.h file not found
.../node-addon-api/napi.h:4:10: fatal error: 'node_api.h' file not found
#include <node_api.h> ^~~~~~~~~~~~ 1 error generated
Pass --nodedir=<nodejs_dir> to
node-gyp [re]build or npm install.
<nodejs_dir> contains the directory
include/node where the file node_api.h
is stored.
make: Unknown option -C
If you use an unsupported version of Make, you might encounter the following error message when running npm or node-gyp to build a C/C++ add-on:
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
FSUM9380 make: Unknown option -C
Usage: make [-eEinpqrstuvVx] [-k|-S] [-c dir] [-D macro=value] [-f file] [macro=value ...] [target ...]
You need to download and install a newer version of Make. For details, see Installing and configuring. iconv-lite warning: JavaScript files use encoding different from utf-8
iconv-lite warning: javascript files use encoding different from utf-8** /path/to/.js:<line-number> ...
SyntaxError: Invalid or unexpected token
If you install the iconv-lite
package by extracting it from a downloaded file, you need to tag the file that is specified in the
error message as ISO8859-1. For details, see Tagging files for Enhanced ASCII support. If the issue cannot be resolved by tagging files, you can try to delete the iconv-lite directory and install it by using the npm install command.
Node.js emits ERROR: listen EACCES: permission denied N1.N2.N3.N4:PORT
This error indicates that the server attempts to bind and listen to a port that is in the reserved port range. To resolve this error, override the reserved port range in the TCP/IP profile configuration by using the TCP/IP PORTRANGE statement and modify the reserved range of ports for a specified user ID.