From 67a89c6cd0c1dc4c581b64ff9a147ea6406fa99d Mon Sep 17 00:00:00 2001 From: Junbo Liang <68558268+junbo75@users.noreply.github.com> Date: Fri, 7 Jan 2022 10:51:08 -0800 Subject: [PATCH] Fix an issue where npm is not found (#6706) Signed-off-by: Junbo Liang <68558268+junbo75@users.noreply.github.com> --- scripts/build/Platform/Linux/deploy_cdk_applications.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/build/Platform/Linux/deploy_cdk_applications.sh b/scripts/build/Platform/Linux/deploy_cdk_applications.sh index 97668ee70c..9a0a31397e 100755 --- a/scripts/build/Platform/Linux/deploy_cdk_applications.sh +++ b/scripts/build/Platform/Linux/deploy_cdk_applications.sh @@ -7,9 +7,6 @@ # # Deploy the CDK applications for AWS gems (Linux only) -# Prerequisites: -# 1) Node.js is installed -# 2) Node.js version >= 10.13.0, except for versions 13.0.0 - 13.6.0. A version in active long-term support is recommended. SOURCE_DIRECTORY=$(dirname "$0") PATH=$SOURCE_DIRECTORY/python:$PATH @@ -70,12 +67,12 @@ echo [cdk_installation] Install the current version of nodejs nvm install node echo [cdk_installation] Install the latest version of CDK -if ! sudo npm uninstall -g aws-cdk; +if ! npm uninstall -g aws-cdk; then echo [cdk_bootstrap] Failed to uninstall the current version of CDK exit 1 fi -if ! sudo npm install -g aws-cdk@latest; +if ! npm install -g aws-cdk@latest; then echo [cdk_bootstrap] Failed to install the latest version of CDK exit 1