Skip to content

Commit ef9b484

Browse files
authored
Merge pull request #954 from aws-amplify/add-timeout
chore: add timeout before installing cli from local registry
2 parents 5aa8599 + 1674d2f commit ef9b484

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

shared-scripts.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,12 @@ function _installCLIFromLocalRegistry {
239239
fi
240240
setNpmRegistryUrlToLocal
241241
changeNpmGlobalPath
242+
# set longer timeout to avoid socket timeout error
243+
npm config set fetch-retries 5
244+
npm config set fetch-timeout 600000
245+
npm config set fetch-retry-mintimeout 30000
246+
npm config set fetch-retry-maxtimeout 180000
247+
npm config set maxsockets 1
242248
npm install -g @aws-amplify/cli-internal
243249
echo "using Amplify CLI version: "$(amplify --version)
244250
npm list -g --depth=1 | grep -e '@aws-amplify/amplify-category-api' -e 'amplify-codegen'

0 commit comments

Comments
 (0)