I'm following the Amplify Gen 2 docs for deploying a Vite + React application. Once I re-deploy the app at the end of Quickstart step 6 (adding login UI), the build fails with the message "Build container ran out of memory" after calling "npm run build" and transforming 1748 modules. The initial build/deployment when following the docs succeeds, but I can't seem to pin down why the second fails.
Below are sections from the two build logs (with my account ID and GitHub username omitted) containing only the npm dependency warnings I receive and the statements after "npm run build" is called.
Build 1 warnings:
2024-12-05T23:27:38.355Z [WARNING]: npm
2024-12-05T23:27:38.362Z [WARNING]: WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
2024-12-05T23:27:39.031Z [WARNING]: npm WARN
2024-12-05T23:27:39.031Z [WARNING]: deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
2024-12-05T23:27:40.529Z [WARNING]: npm WARN deprecated
2024-12-05T23:27:40.529Z [WARNING]: @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
2024-12-05T23:27:40.605Z [WARNING]: npm WARN
2024-12-05T23:27:40.605Z [WARNING]: deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
2024-12-05T23:27:40.850Z [WARNING]: npm WARN deprecated
2024-12-05T23:27:40.850Z [WARNING]: @babel/plugin-proposal-class-properties@7.18.6: 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.
npm WARN deprecated @babel/plugin-proposal-object-rest-spread@7.20.7: 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.
2024-12-05T23:27:42.156Z [WARNING]: npm WARN
2024-12-05T23:27:42.161Z [WARNING]: deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
2024-12-05T23:27:45.415Z [WARNING]: npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
2024-12-05T23:27:50.306Z [WARNING]: npm WARN
2024-12-05T23:27:50.311Z [WARNING]: deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
2024-12-05T23:27:52.617Z [WARNING]: npm WARN deprecated core-js@2.6.12: 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.
Build 1 final statements:
2024-12-05T23:31:15.549Z [INFO]: # Executing command: npm run build
2024-12-05T23:31:15.816Z [INFO]: > amplify-vite-react-template@0.0.0 build
> tsc && vite build
2024-12-05T23:31:21.218Z [INFO]: vite v5.4.10 building for production...
2024-12-05T23:31:21.275Z [INFO]: transforming...
2024-12-05T23:31:23.393Z [INFO]: ✓ 788 modules transformed.
2024-12-05T23:31:23.636Z [INFO]: rendering chunks...
2024-12-05T23:31:23.644Z [INFO]: computing gzip size...
2024-12-05T23:31:23.658Z [INFO]: dist/index.html 0.46 kB │ gzip: 0.30 kB
2024-12-05T23:31:23.658Z [INFO]: dist/assets/index-BGFuHSfN.css 0.90 kB │ gzip: 0.49 kB
dist/assets/index-CwVTmeDt.js 320.90 kB │ gzip: 99.74 kB
2024-12-05T23:31:23.658Z [INFO]: ✓ built in 2.42s
2024-12-05T23:31:23.682Z [INFO]: # Completed phase: build
## Completed Frontend Build
2024-12-05T23:31:23.706Z [INFO]: ## Build completed successfully
2024-12-05T23:31:23.707Z [INFO]: # Starting caching...
2024-12-05T23:31:23.711Z [INFO]: # Creating cache artifact...
2024-12-05T23:31:43.395Z [INFO]: # Created cache artifact
2024-12-05T23:31:43.563Z [INFO]: # Uploading cache artifact...
2024-12-05T23:31:53.932Z [INFO]: # Uploaded cache artifact
2024-12-05T23:31:54.115Z [INFO]: # Caching completed
2024-12-05T23:31:54.122Z [INFO]: # Starting build artifact upload process...
2024-12-05T23:31:54.159Z [INFO]: # Uploading build artifact '__artifacts.zip'...
2024-12-05T23:31:54.311Z [INFO]: # Build artifact upload completed
2024-12-05T23:31:54.311Z [INFO]: # Starting environment caching...
2024-12-05T23:31:54.311Z [INFO]: # Uploading environment cache artifact...
2024-12-05T23:31:54.428Z [INFO]: # Uploaded environment cache artifact
2024-12-05T23:31:54.428Z [INFO]: # Environment caching completed
Build 2 warnings:
2024-12-05T23:52:20.197Z [WARNING]: npm
2024-12-05T23:52:20.203Z [WARNING]: WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
2024-12-05T23:52:20.308Z [WARNING]: npm
2024-12-05T23:52:20.309Z [WARNING]: WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: 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.
2024-12-05T23:52:20.483Z [WARNING]: npm WARN deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
2024-12-05T23:52:20.544Z [WARNING]: npm
2024-12-05T23:52:20.545Z [WARNING]: WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
2024-12-05T23:52:20.750Z [WARNING]: npm
2024-12-05T23:52:20.751Z [WARNING]: WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
2024-12-05T23:52:20.759Z [WARNING]: npm
2024-12-05T23:52:20.759Z [WARNING]: WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
2024-12-05T23:52:20.789Z [WARNING]: npm
2024-12-05T23:52:20.789Z [WARNING]: WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
2024-12-05T23:52:20.815Z [WARNING]: npm
2024-12-05T23:52:20.815Z [WARNING]: WARN deprecated @babel/plugin-proposal-object-rest-spread@7.20.7: 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.
2024-12-05T23:52:27.476Z [WARNING]: npm WARN
2024-12-05T23:52:27.482Z [WARNING]: deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
2024-12-05T23:52:28.860Z [WARNING]: npm WARN
2024-12-05T23:52:28.860Z [WARNING]: deprecated core-js@2.6.12: 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.
Build 2 final statements:
# Executing command: npm run build
2024-12-05T23:53:33.983Z [INFO]: > amplify-vite-react-template@0.0.0 build
> tsc && vite build
2024-12-05T23:53:39.588Z [INFO]: vite v5.4.10 building for production...
2024-12-05T23:53:39.641Z [INFO]: transforming...
2024-12-05T23:53:44.137Z [INFO]: ✓ 1748 modules transformed.
<BUILD FAILS HERE>