awslabs / aws-saas-boost

AWS SaaS Boost is a ready-to-use toolset that removes the complexity of successfully running SaaS workloads in the AWS cloud.
Apache License 2.0
954 stars 188 forks source link

`n 14` not work in code build in China regions #522

Closed amliuyong closed 7 months ago

amliuyong commented 1 year ago

build log of sb-test-admin-web


[Container] 2023/06/28 07:25:38 Waiting for agent ping
2 | [Container] 2023/06/28 07:25:39 Waiting for DOWNLOAD_SOURCE
3 | [Container] 2023/06/28 07:25:39 Phase is DOWNLOAD_SOURCE
4 | [Container] 2023/06/28 07:25:39 CODEBUILD_SRC_DIR=/codebuild/output/src1719478853/src
5 | [Container] 2023/06/28 07:25:39 YAML location is /codebuild/readonly/buildspec.yml
6 | [Container] 2023/06/28 07:25:39 Processing environment variables
7 | [Container] 2023/06/28 07:25:39 No runtime version selected in buildspec.
8 | [Container] 2023/06/28 07:25:39 Moving to directory /codebuild/output/src1719478853/src
9 | [Container] 2023/06/28 07:25:39 Configuring ssm agent with target id: codebuild:7f355ee4-3f3e-41b6-8c8e-f511393e0e4c
10 | [Container] 2023/06/28 07:25:39 Successfully updated ssm agent configuration
11 | [Container] 2023/06/28 07:25:39 Registering with agent
12 | [Container] 2023/06/28 07:25:39 Phases found in YAML: 3
13 | [Container] 2023/06/28 07:25:39  BUILD: 4 commands
14 | [Container] 2023/06/28 07:25:39  POST_BUILD: 2 commands
15 | [Container] 2023/06/28 07:25:39  PRE_BUILD: 4 commands
16 | [Container] 2023/06/28 07:25:39 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED
17 | [Container] 2023/06/28 07:25:39 Phase context status code:  Message:
18 | [Container] 2023/06/28 07:25:39 Entering phase INSTALL
19 | [Container] 2023/06/28 07:25:39 Phase complete: INSTALL State: SUCCEEDED
20 | [Container] 2023/06/28 07:25:39 Phase context status code:  Message:
21 | [Container] 2023/06/28 07:25:39 Entering phase PRE_BUILD
22 | [Container] 2023/06/28 07:25:39 Running command n 14
23 | curl: (28) Failed to connect to nodejs.org port 443 after 265357 ms: Couldn't connect to server
24 |  
25 | Error: failed to download version index (https://nodejs.org/dist/index.tab)
26 |  
27 |  
28 | [Container] 2023/06/28 07:30:07 Command did not exit successfully n 14 exit status 2
29 | [Container] 2023/06/28 07:30:07 Phase complete: PRE_BUILD State: FAILED
30 | [Container] 2023/06/28 07:30:07 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: n 14. Reason: exit status 2
31

<br class="Apple-interchange-newline">

Reproduction Steps

What did you expect to happen?

What actually happened?

Environment

Other

need to upgrade to n 16, this version works.


[Container] 2023/07/03 01:28:41 Entering phase PRE_BUILD
22 | [Container] 2023/07/03 01:28:41 Running command n 16
23 | installing : node-v16.20.1
24 | mkdir : /usr/local/n/versions/node/16.20.1
25 | fetch : https://nodejs.org/dist/v16.20.1/node-v16.20.1-linux-arm64.tar.xz
26 | copying : node/16.20.1
27 | installed : v16.20.1 (with npm 8.19.4)
28 |  
29 | [Container] 2023/07/03 01:28:53 Running command if [ "$REACT_APP_AWS_REGION" = "cn-northwest-1" ] \|\| [ "$REACT_APP_AWS_REGION" = "cn-north-1" ]; then npm config set registry https://registry.npm.taobao.org; fi
30 |  
31 | [Container] 2023/07/03 01:28:53 Running command aws s3 cp s3://$SOURCE_BUCKET/client/web/src.zip src.zip
32 | Completed 256.0 KiB/493.0 KiB (3.0 MiB/s) with 1 file(s) remaining
33

<br class="Apple-interchange-newline">

This is :bug: Bug Report