Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails without modifications #2

Open
jake17007 opened this issue Dec 9, 2023 · 1 comment
Open

Build fails without modifications #2

jake17007 opened this issue Dec 9, 2023 · 1 comment

Comments

@jake17007
Copy link

Following this guide: https://docs.aws.amazon.com/amplify/latest/userguide/deploy-backend.html#step-1-deploy-frontend

Clicking "Deploy Amplify Hosting"

It creates an amplify app

Build fails without modifying anything.

Error logs:

2023-12-09T14:26:17.656Z [INFO]: Git SSH Key acquired
2023-12-09T14:26:17.775Z [INFO]: # Cloning repository: [email protected]:jake17007/aws-starter-react-for-github-actions.git
2023-12-09T14:26:19.182Z [INFO]: Agent pid 160
2023-12-09T14:26:19.183Z [INFO]: Identity added: /root/.ssh/git_rsa (/root/.ssh/git_rsa)
                                 Cloning into 'aws-starter-react-for-github-actions'...
                                 Warning: Permanently added the ECDSA host key for IP address '140.82.112.3' to the list of known hosts.
2023-12-09T14:26:19.183Z [INFO]: # Checking for Git submodules at: /codebuild/output/src4222902358/src/aws-starter-react-for-github-actions/.gitmodules
2023-12-09T14:26:19.197Z [INFO]: # Retrieving environment cache...
2023-12-09T14:26:19.253Z [WARNING]: ! Unable to write cache: {"code":"ERR_BAD_REQUEST","message":"Request failed with status code 404"})}
2023-12-09T14:26:19.253Z [INFO]: ---- Setting Up SSM Secrets ----
2023-12-09T14:26:19.253Z [INFO]: SSM params {"Path":"/amplify/d24lbybmlfy9u7/devi/","WithDecryption":true}
2023-12-09T14:26:19.296Z [WARNING]: !Failed to set up process.env.secrets
2023-12-09T14:26:39.746Z [INFO]: # Patching NPM package '@aws-amplify/cli' from 10.5.2 to 12.8.2...
2023-12-09T14:26:58.072Z [INFO]: # Done patching NPM package '@aws-amplify/cli' to version 12.8.2
2023-12-09T14:26:58.198Z [INFO]: # Retrieving cache...
2023-12-09T14:26:58.229Z [INFO]: # Retrieved cache
2023-12-09T14:27:02.393Z [INFO]: ## Starting Backend Build
                                 ## Checking for associated backend environment...
                                 ## No backend environment association found, continuing...
                                 ## Completed Backend Build
2023-12-09T14:27:02.396Z [INFO]: ## Starting Frontend Build
2023-12-09T14:27:02.396Z [INFO]: # Starting phase: test
                                 # Executing command: yarn test
2023-12-09T14:27:03.181Z [INFO]: yarn run v1.22.0
2023-12-09T14:27:03.215Z [INFO]: $ react-scripts test
2023-12-09T14:27:03.227Z [WARNING]: /bin/sh: react-scripts: command not found
2023-12-09T14:27:03.237Z [WARNING]: error Command failed with exit code 127.
2023-12-09T14:27:03.237Z [INFO]: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2023-12-09T14:27:03.245Z [INFO]: # Completed phase: test
                                 # Starting phase: preBuild
2023-12-09T14:27:03.246Z [INFO]: # Executing command: yarn install
2023-12-09T14:27:03.373Z [INFO]: yarn install v1.22.0
2023-12-09T14:27:03.402Z [INFO]: info No lockfile found.
2023-12-09T14:27:03.408Z [INFO]: [1/4] Resolving packages...
2023-12-09T14:27:03.919Z [WARNING]: warning @testing-library/jest-dom > css > [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
2023-12-09T14:27:03.932Z [WARNING]: warning @testing-library/jest-dom > css > [email protected]: Please see https://github.com/lydell/urix#deprecated
2023-12-09T14:27:03.932Z [WARNING]: warning @testing-library/jest-dom > css > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
2023-12-09T14:27:03.939Z [WARNING]: warning @testing-library/jest-dom > css > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
2023-12-09T14:27:03.947Z [WARNING]: warning @testing-library/jest-dom > css > source-map-resolve > [email protected]: See https://github.com/lydell/source-map-url#deprecated
2023-12-09T14:27:04.772Z [WARNING]: warning @testing-library/react > @types/testing-library__react > @types/[email protected]: This is a stub types definition. testing-library__dom provides its own type definitions, so you do not need this installed.
2023-12-09T14:27:06.154Z [WARNING]: warning react-scripts > [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
2023-12-09T14:27:06.212Z [WARNING]: warning react-scripts > [email protected]: This loader has been deprecated. Please use eslint-webpack-plugin
2023-12-09T14:27:06.277Z [WARNING]: warning react-scripts > [email protected]: please switch to a stable version
2023-12-09T14:27:06.571Z [WARNING]: warning react-scripts > [email protected]: "Please update to latest v2.3 or v2.2"
2023-12-09T14:27:06.808Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
2023-12-09T14:27:06.835Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
2023-12-09T14:27:06.836Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
2023-12-09T14:27:06.839Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
2023-12-09T14:27:06.840Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
2023-12-09T14:27:07.244Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
2023-12-09T14:27:07.244Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
2023-12-09T14:27:07.996Z [WARNING]: warning react-scripts > webpack-dev-server > [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
2023-12-09T14:27:08.000Z [WARNING]: warning react-scripts > webpack-dev-server > chokidar > [email protected]: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
2023-12-09T14:27:08.362Z [WARNING]: warning react-scripts > babel-jest > @jest/transform > jest-haste-map > [email protected]: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
2023-12-09T14:27:09.024Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.
2023-12-09T14:27:09.027Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead.
2023-12-09T14:27:09.029Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.
2023-12-09T14:27:09.032Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.
2023-12-09T14:27:09.035Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
2023-12-09T14:27:09.062Z [WARNING]: warning react-scripts > @svgr/webpack > @svgr/plugin-svgo > [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
2023-12-09T14:27:09.356Z [WARNING]: warning react-scripts > jest-environment-jsdom-fourteen > jsdom > [email protected]: Use your platform's native atob() and btoa() methods instead
2023-12-09T14:27:09.393Z [WARNING]: warning react-scripts > jest-environment-jsdom-fourteen > jsdom > [email protected]: Use your platform's native DOMException instead
2023-12-09T14:27:09.400Z [WARNING]: warning react-scripts > jest-environment-jsdom-fourteen > jsdom > data-urls > [email protected]: Use your platform's native atob() and btoa() methods instead
2023-12-09T14:27:09.425Z [WARNING]: warning react-scripts > jest-environment-jsdom-fourteen > jsdom > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
2023-12-09T14:27:09.440Z [WARNING]: warning react-scripts > jest-environment-jsdom-fourteen > jsdom > [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
2023-12-09T14:27:09.451Z [WARNING]: warning react-scripts > jest-environment-jsdom-fourteen > jsdom > w3c-xmlserializer > [email protected]: Use your platform's native DOMException instead
2023-12-09T14:27:09.710Z [WARNING]: warning react-scripts > babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.
                                    warning react-scripts > babel-preset-react-app > @babel/preset-env > @babel/preset-modules > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.
2023-12-09T14:27:09.769Z [WARNING]: warning react-scripts > jest-environment-jsdom-fourteen > jsdom > [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
2023-12-09T14:27:10.362Z [WARNING]: warning react-scripts > webpack-dev-server > sockjs > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2023-12-09T14:27:10.363Z [WARNING]: warning react-scripts > webpack-dev-server > webpack-log > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
                                    warning react-scripts > jest-environment-jsdom-fourteen > jsdom > request > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2023-12-09T14:27:10.585Z [WARNING]: warning react-scripts > webpack > micromatch > snapdragon > [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
2023-12-09T14:27:10.757Z [WARNING]: warning react-scripts > webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
2023-12-09T14:27:10.907Z [WARNING]: warning react-scripts > babel-jest > @jest/transform > jest-haste-map > [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
2023-12-09T14:27:11.267Z [WARNING]: warning react-scripts > @svgr/webpack > @svgr/plugin-svgo > svgo > [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
2023-12-09T14:27:11.548Z [WARNING]: warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/[email protected]: Switch to 'npm install joi'
2023-12-09T14:27:11.643Z [WARNING]: warning react-scripts > jest-environment-jsdom-fourteen > jsdom > request > [email protected]: this library is no longer supported
2023-12-09T14:27:11.841Z [WARNING]: warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: Use your platform's native atob() and btoa() methods instead
2023-12-09T14:27:11.841Z [WARNING]: warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: Use your platform's native DOMException instead
                                    warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
                                    warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
                                    warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
2023-12-09T14:27:11.994Z [WARNING]: warning react-scripts > optimize-css-assets-webpack-plugin > cssnano > cssnano-preset-default > postcss-svgo > [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
2023-12-09T14:27:12.005Z [WARNING]: warning react-scripts > postcss-preset-env > postcss-color-gray > postcss-values-parser > [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
2023-12-09T14:27:12.957Z [WARNING]: warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
2023-12-09T14:27:12.965Z [WARNING]: warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
2023-12-09T14:27:12.966Z [WARNING]: warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/topo > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
2023-12-09T14:27:13.082Z [WARNING]: warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: use String.prototype.padStart()
2023-12-09T14:27:13.352Z [WARNING]: warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
2023-12-09T14:27:13.373Z [WARNING]: warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/address'
2023-12-09T14:27:13.596Z [WARNING]: warning react-scripts > workbox-webpack-plugin > workbox-build > strip-comments > babel-plugin-transform-object-rest-spread > babel-runtime > [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
2023-12-09T14:27:14.506Z [INFO]: [2/4] Fetching packages...
2023-12-09T14:27:30.051Z [INFO]: info [email protected]: The platform "linux" is incompatible with this module.
2023-12-09T14:27:30.053Z [INFO]: info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
2023-12-09T14:27:30.054Z [INFO]: info [email protected]: The platform "linux" is incompatible with this module.
                                 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info [email protected]: The platform "linux" is incompatible with this module.
                                 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
2023-12-09T14:27:30.061Z [INFO]: [3/4] Linking dependencies...
2023-12-09T14:27:30.063Z [WARNING]: warning " > @testing-library/[email protected]" has unmet peer dependency "@testing-library/dom@>=5".
2023-12-09T14:27:38.460Z [INFO]: [4/4] Building fresh packages...
2023-12-09T14:27:40.076Z [INFO]: success Saved lockfile.
2023-12-09T14:27:40.080Z [INFO]: Done in 36.71s.
2023-12-09T14:27:40.130Z [INFO]: # Completed phase: preBuild
                                 # Starting phase: build
                                 # Executing command: yarn run build
2023-12-09T14:27:40.268Z [INFO]: yarn run v1.22.0
2023-12-09T14:27:40.305Z [INFO]: $ react-scripts build
2023-12-09T14:27:41.415Z [INFO]: Creating an optimized production build...
2023-12-09T14:27:48.340Z [INFO]: Failed to compile.
2023-12-09T14:27:48.342Z [INFO]: /codebuild/output/src4222902358/src/aws-starter-react-for-github-actions/node_modules/@types/babel__traverse/index.d.ts
                                 TypeScript error in /codebuild/output/src4222902358/src/aws-starter-react-for-github-actions/node_modules/@types/babel__traverse/index.d.ts(314,13):
                                 Type expected.  TS1110
                                 312 |         // too complex for TS. So we type it as a general visitor only if the key contains `|`
                                 313 |         // this is good enough for non-visitor traverse options e.g. `noScope`
                                 > 314 |         [k: `${string}|${string}`]: VisitNode<S, Node>;
                                 |             ^
                                 315 |     };
                                 316 |
                                 317 | export type VisitNode<S, P extends Node> = VisitNodeFunction<S, P> | VisitNodeObject<S, P>;
2023-12-09T14:27:48.371Z [WARNING]: error Command failed with exit code 1.
2023-12-09T14:27:48.371Z [INFO]: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2023-12-09T14:27:48.380Z [ERROR]: !!! Build failed
2023-12-09T14:27:48.380Z [ERROR]: !!! Non-Zero Exit Code detected
2023-12-09T14:27:48.380Z [INFO]: # Starting environment caching...
2023-12-09T14:27:48.381Z [INFO]: # Environment caching completed
Terminating logging...

@ronmorton
Copy link

Upgraded typescript version to 4.4.3 and react-script to 4.0.3 worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants