diff --git a/bin/commands/.errors b/bin/commands/.errors index 89b56b008f..b41af191c9 100644 --- a/bin/commands/.errors +++ b/bin/commands/.errors @@ -32,4 +32,5 @@ ZWEL0200E||Failed to copy USS file %s to MVS data set %s. ZWEL0201E||File %s does not exist. ZWEL0202E||Unable to find samplib key for %s. ZWEL0203E||Env value in key-value pair %s has not been defined. -ZWEL0316E||Command requires zowe.useConfigmgr=true to use. \ No newline at end of file +ZWEL0316E||Command requires zowe.useConfigmgr=true to use. +ZWEL0319E||NodeJS required but not found. Errors such as ZWEL0157E may occur as a result. The value 'node.home' in the Zowe YAML is not correct. diff --git a/bin/libs/json.sh b/bin/libs/json.sh index 5b5342a4a3..bf41777c1a 100644 --- a/bin/libs/json.sh +++ b/bin/libs/json.sh @@ -83,6 +83,13 @@ read_yaml() { code=$? print_trace " * Exit code: ${code}" if [ ${code} -ne 0 ]; then + # Check for "node ... FSUM7351 not found". Common user error that we can solve more quickly by providing advice below. + missing_id_check=$(echo "${ZWE_PRIVATE_YAML_CACHE}" | grep "FSUM7351" 2>&1) + if [ -n "${missing_id_check}" ]; then + print_error "Error ZWEL0319E: NodeJS required but not found. Errors such as ZWEL0157E may occur as a result." + print_error "The value 'node.home' in the Zowe YAML is not correct. Set it to the parent directory of 'bin/node'." + print_error "For example, if NodeJS is at '/opt/nodejs/bin/node', then set 'node.home' to '/opt/nodejs'." + fi print_error " * Output:" print_error "$(padding_left "${ZWE_PRIVATE_YAML_CACHE}" " ")" return ${code}