Prod CW Error

[Container] 2020/09/29 07:57:16 Waiting for agent ping
2[Container] 2020/09/29 07:57:18 Waiting for DOWNLOAD_SOURCE
3[Container] 2020/09/29 07:57:19 Phase is DOWNLOAD_SOURCE
4[Container] 2020/09/29 07:57:19 CODEBUILD_SRC_DIR=/codebuild/output/src846618450/src
5[Container] 2020/09/29 07:57:19 YAML location is /codebuild/readonly/buildspec.yml
6[Container] 2020/09/29 07:57:19 Processing environment variables
7[Container] 2020/09/29 07:57:19 Moving to directory /codebuild/output/src846618450/src
8[Container] 2020/09/29 07:57:19 Registering with agent
9[Container] 2020/09/29 07:57:19 Phases found in YAML: 3
10[Container] 2020/09/29 07:57:19 BUILD: 7 commands
11[Container] 2020/09/29 07:57:19 POST_BUILD: 5 commands
12[Container] 2020/09/29 07:57:19 PRE_BUILD: 2 commands
13[Container] 2020/09/29 07:57:19 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED
14[Container] 2020/09/29 07:57:19 Phase context status code: Message:
15[Container] 2020/09/29 07:57:19 Entering phase INSTALL
16[Container] 2020/09/29 07:57:19 Phase complete: INSTALL State: SUCCEEDED
17[Container] 2020/09/29 07:57:19 Phase context status code: Message:
18[Container] 2020/09/29 07:57:19 Entering phase PRE_BUILD
19[Container] 2020/09/29 07:57:19 Running command aws s3api get-object --bucket coitool-artifacts-714049641531-0a61065101467ebf --key $ARTIFACTS_KEY $ARTIFACTS_KEY
20{
21 "ETag": "\"f3a45ba0446be6184e069edfd28a72d0-14\"",
22 "ContentType": "binary/octet-stream",
23 "ContentLength": 72806681,
24 "LastModified": "Tue, 29 Sep 2020 07:56:37 GMT",
25 "Metadata": {
26 "codebuild-buildarn": "arn:aws:codebuild:us-east-1:714049641531:build/coitool-ci-2855884eba570b34:bbcdd8ab-0526-4a35-b9be-280611466a09"
27 },
28 "Expiration": "expiry-date=\"Tue, 29 Dec 2020 0000:00:00 GMT\", rule-id=\"tf-s3-lifecycle-20190425102506446600000002\"",
29 "AcceptRanges": "bytes"
30}
31
32[Container] 2020/09/29 07:57:21 Running command tar xzf $ARTIFACTS_KEY
33
34[Container] 2020/09/29 07:57:24 Phase complete: PRE_BUILD State: SUCCEEDED
35[Container] 2020/09/29 07:57:24 Phase context status code: Message:
36[Container] 2020/09/29 07:57:24 Entering phase BUILD
37[Container] 2020/09/29 07:57:24 Running command NEW_VERSION=$(echo $ARTIFACTS_KEY | cut -c 1-7)
38
39[Container] 2020/09/29 07:57:24 Running command mkdir dist && mkdir dist/.manifests dist/$NEW_VERSION
40
41[Container] 2020/09/29 07:57:24 Running command npm run export
42

43coitool@1.0.0 export /codebuild/output/src846618450/src
44soya-next-scripts export

45

46using build directory: /codebuild/output/src846618450/src/.next

47 copying "static" directory
48 copying "static build" directory

49No "exportPathMap" found in "next.config.js". Generating map from "./pages"

50 launching 1 threads with concurrency of 10 per thread
51Using browser-only version of superagent in non-browser environment
52Warning: React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.
53Error: Duplicate reducer name: oidc
54 at /codebuild/output/src846618450/src/node_modules/soya-next/lib/redux/storeEnhancer.js:38:23
55 at Array.forEach (<anonymous>)
56 at Object.addReducer (/codebuild/output/src846618450/src/node_modules/soya-next/lib/redux/storeEnhancer.js36:36:18)
57 at new ApplyReducers (/codebuild/output/src846618450/src/node_modules/soya-next/lib/redux/applyReducers.js:113:21)
58 at processChild (/codebuild/output/src846618450/src/node_modules/react-dom/cjs/react-dom-server.node.development.js:2995:14)
59 at resolve (/codebuild/output/src846618450/src/node_modules/react-dom/cjs/react-dom-server.node.development.js:2960:5)
60 at ReactDOMServerRenderer.render (/codebuild/output/src846618450/src/node_modules/react-dom/cjs/react-dom-server.node.development.js:3435:22)
61 at ReactDOMServerRenderer.read (/codebuild/output/src846618450/src/node_modules/react-dom/cjs/react-dom-server.node.development.js:3373:29)
62 at renderToString (/codebuild/output/src846618450/src/node_modules/react-dom/cjs/react-dom-server.node.development.js:3988:27)
63 at render (/codebuild/output/src846618450/src/node_modules/next-server/dist/server/render.js86:86:16)
64{}
65Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
66

68
69Please update the following components: Styled(div)
70 in Styled(div)
71 in _default
72 in Fragment
73 in AuthCallback
74 in Context.Consumer
75 in withAuth(AuthCallback)
76 in OIDCCallback
77 in withRouter(OIDCCallback)
78 in OIDCCallbackPage
79 in Context.Provider
80 in AuthProvider
81 in withOIDCAuth(OIDCCallbackPage)
82 in Connect(withOIDCAuth(OIDCCallbackPage))
83 in applyReducers(Connect(withOIDCAuth(OIDCCallbackPage)))
84 in Provider
85 in WithReduxStore
86 in withStore(WithReduxStore)
87 in Context.Provider
88 in LocaleProvider
89 in CookiesProvider
90 in BaseProvider
91 in BasePage
92 in withCookies(BasePage)
93 in applyRedirect(withCookies(BasePage))
94 in withLocale(applyRedirect(withCookies(BasePage)))
95 in Page
96 in Context.Provider
97 in AuthProvider
98 in withOIDCAuth(Page)
99 in Connect(withOIDCAuth(Page))
100 in applyReducers(Connect(withOIDCAuth(Page)))
101 in Provider
102 in WithReduxStore
103 in withStore(WithReduxStore)
104 in Context.Provider
105 in LocaleProvider
106 in CookiesProvider
107 in BaseProvider
108 in BasePage
109 in withCookies(BasePage)
110 in applyRedirect(withCookies(BasePage))
111 in withLocale(applyRedirect(withCookies(BasePage)))
112 in Container
113 in _default
114 in Context.Provider
115 in Context.Provider
116 in Context.Provider
117 in Context.Provider
118npm ERR! code ELIFECYCLE
119npm ERR! errno 1
120npm ERR! coitool@1.0.0 export: soya-next-scripts export
121npm ERR! Exit status 1
122npm ERR!
123npm ERR! Failed at the coitool@1.0.0 export script.
124npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
125
126npm ERR! A complete log of this run can be found in:
127npm ERR! /root/.npm/_logs/2020-09-29T07_57_26_736Z-debug.log
128
129[Container] 2020/09/29 07:57:26 Command did not exit successfully npm run export exit status 1
130[Container] 2020/09/29 07:57:26 Phase complete: BUILD State: FAILED
131[Container] 2020/09/29 07:57:26 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: npm run export. Reason: exit status 1
132[Container] 2020/09/29 07:57:26 Entering phase POST_BUILD
133[Container] 2020/09/29 07:57:26 Running command # get latest version before uploading new release
134CURRENT_VERSION_KEY=$(aws s3api list-objects-v2 --bucket coitool-static-website-714049641531-36d30e069be3e18b --prefix .manifests --query "Contents && max_by(Contents, &LastModified).Key")
135
136
137[Container] 2020/09/29 07:57:27 Running command aws s3 sync dist s3://coitool-static-website-714049641531-36d30e069be3e18b
138
139[Container] 2020/09/29 07:57:28 Running command if [ "$CURRENT_VERSION_KEY" != "null" ]; then
140 aws cloudfront create-invalidation --distribution-id E3JVF9CM29O748 --paths "/*"
141fi
142
143{
144 "Invalidation": {
145 "Id": "I1ICMWZXDQT7ZD",
146 "Status": "InProgress",
147 "CreateTime": "2020-09-29T07:57:29.356Z",
148 "InvalidationBatch": {
149 "CallerReference": "cli-1601366249-291423",
150 "Paths": {
151 "Items": [
152 "/*"
153 ],
154 "Quantity": 1
155 }
156 }
157 },
158 "Location": "https://cloudfront.amazonaws.com/2018-11-05/distribution/E3JVF9CM29O748/invalidation/I1ICMWZXDQT7ZD"
159}
160
161[Container] 2020/09/29 07:57:29 Running command DELETE_KEYS=$(aws s3api list-objects-v2 --bucket coitool-static-website-714049641531-36d30e069be3e18b --prefix .manifests --query 'sort_by(Contents, &LastModified)[:-50].Key')
162
163[Container] 2020/09/29 07:57:30 Running command if [ $(echo $DELETE_KEYS | jq 'length') -gt 0 ]; then
164 # cleanup s3 objects
165 aws s3api delete-objects --bucket coitool-static-website-714049641531-36d30e069be3e18b --delete $(echo $DELETE_KEYS | jq -r '"Objects=[\(map("{Key=\"\(.)\"}") | join(","))]"')
166 echo $DELETE_KEYS | jq -r '.[][11:18]' | xargs -I {} aws s3 rm s3://coitool-static-website-714049641531-36d30e069be3e18b/{} --recursive
167fi