Bryan Smith
03/10/2022, 10:24 PMCreating an optimized production build...
warn - As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`.
warn - Please update your color palette to eliminate this warning.
Failed to compile.
spawn ENOMEM
Error: There was a problem building the "ReactSite" StaticSite.
at ReactStaticSite.buildApp (/tmp/seed/source/node_modules/@serverless-stack/resources/src/StaticSite.ts:328:15)
at new StaticSite (/tmp/seed/source/node_modules/@serverless-stack/resources/src/StaticSite.ts:134:24)
at new ReactStaticSite (/tmp/seed/source/node_modules/@serverless-stack/resources/src/ReactStaticSite.ts:43:5)
at new FrontendStack (/tmp/seed/source/stacks/FrontendStack.js:10:18)
at Object.main (/tmp/seed/source/stacks/index.js:23:3)
at Object.<anonymous> (/tmp/seed/source/.build/run.js:93:16)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
Error: Subprocess exited with error 1
at ChildProcess.<anonymous> (/tmp/seed/source/node_modules/aws-cdk/lib/api/cxapp/exec.ts:122:23)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:467:12)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
There was an error synthesizing your app.
ERROR: Error: Subprocess exited with error 1
Frank
npm/yarn install
in ur React app.Frank
seed.yml
buildspec in the root that looks like this:
before_build:
- cd path/to/frontend && npm install
Frank
Frank
Bryan Smith
03/10/2022, 10:32 PMBryan Smith
03/10/2022, 10:48 PMbefore_build:
- echo "Before build"
- cd frontend && npm install
Frank
npm run build
is not showingFrank
before_build:
- echo "Before build"
- cd frontend && npm install && npm run build
Let’s see what the error output is.Bryan Smith
03/11/2022, 6:12 AM====================
📦 Build
====================
$ cd /tmp/seed/source
INFO: Running before_build hook
$ echo "Before build"
0.11 s
$ cd frontend && npm install && npm run build
227.41 s
npm WARN deprecated urix@0.1.0: Please see <https://github.com/lydell/urix#deprecated>
npm WARN deprecated source-map-resolve@0.5.3: See <https://github.com/lydell/source-map-resolve#deprecated>
npm WARN deprecated source-map-url@0.4.1: See <https://github.com/lydell/source-map-url#deprecated>
npm WARN deprecated resolve-url@0.2.1: <https://github.com/lydell/resolve-url#deprecated>
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.3.2: 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.
npm WARN deprecated uuid@3.3.2: 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.
npm WARN deprecated uuid@3.4.0: 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.
npm WARN deprecated source-map-resolve@0.6.0: See <https://github.com/lydell/source-map-resolve#deprecated>
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated core-js@2.6.12: core-js@<3.4 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. Please, upgrade your dependencies to the actual version of core-js.
added 3132 packages, and audited 3133 packages in 1m
300 packages are looking for funding
run `npm fund` for details
53 vulnerabilities (2 low, 20 moderate, 27 high, 4 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
> frontend@0.1.0 build
> craco build
Creating an optimized production build...
warn - As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`.
warn - Please update your color palette to eliminate this warning.
Treating warnings as errors because <http://process.env.CI|process.env.CI> = true.
Most CI servers set it automatically.
Failed to compile.
src/App.js
Line 35:18: 'handleLogout' is defined but never used no-unused-vars
src/components/common/Filter/index.jsx
Line 11:8: 'refresh' is defined but never used no-unused-vars
Line 43:5: 'posture' is assigned a value but never used no-unused-vars
Line 44:5: 'setPosture' is assigned a value but never used no-unused-vars
src/components/common/Navbar/index.jsx
Line 28:10: 'isAuthenticated' is assigned a value but never used no-unused-vars
src/pages/BenchmarkSignIn/index.jsx
Line 2:10: 'useContext' is defined but never used no-unused-vars
Line 3:8: 'axios' is defined but never used no-unused-vars
Line 7:8: 'config' is defined but never used no-unused-vars
Line 20:8: 'Context' is defined but never used no-unused-vars
src/pages/BenchmarkSignUp/index.jsx
Line 2:10: 'useContext' is defined but never used no-unused-vars
Line 3:8: 'axios' is defined but never used no-unused-vars
Line 7:8: 'config' is defined but never used no-unused-vars
Line 20:8: 'Context' is defined but never used no-unused-vars
src/pages/PrivacyPolicy/index.jsx
Line 101:11: The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: <https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md> jsx-a11y/anchor-is-valid
Line 128:13: The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: <https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md> jsx-a11y/anchor-is-valid
Line 345:11: The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: <https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md> jsx-a11y/anchor-is-valid
ERROR: Failed to run: cd frontend && npm install && npm run build
Build v13 completed in 4m 36s. Used 0 build minutes.
Bryan Smith
03/11/2022, 6:16 AMBryan Smith
03/11/2022, 6:22 AM====================
📦 Build
====================
$ cd /tmp/seed/source
INFO: Running before_build hook
$ echo "Before build"
0.10 s
$ cd frontend && npm install && npm run build
278.23 s
npm WARN deprecated urix@0.1.0: Please see <https://github.com/lydell/urix#deprecated>
npm WARN deprecated source-map-url@0.4.1: See <https://github.com/lydell/source-map-url#deprecated>
npm WARN deprecated source-map-resolve@0.5.3: See <https://github.com/lydell/source-map-resolve#deprecated>
npm WARN deprecated resolve-url@0.2.1: <https://github.com/lydell/resolve-url#deprecated>
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.3.2: 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.
npm WARN deprecated uuid@3.3.2: 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.
npm WARN deprecated source-map-resolve@0.6.0: See <https://github.com/lydell/source-map-resolve#deprecated>
npm WARN deprecated uuid@3.4.0: 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.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated core-js@2.6.12: core-js@<3.4 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. Please, upgrade your dependencies to the actual version of core-js.
added 3132 packages, and audited 3133 packages in 2m
300 packages are looking for funding
run `npm fund` for details
53 vulnerabilities (2 low, 20 moderate, 27 high, 4 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
> frontend@0.1.0 build
> craco build
Creating an optimized production build...
warn - As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`.
warn - Please update your color palette to eliminate this warning.
Failed to compile.
Failed to minify the bundle. Error: static/js/3.11ade377.chunk.js from Terser
Error: Call retries were exceeded
at /tmp/seed/source/frontend/node_modules/react-scripts/scripts/build.js:188:23
at finalCallback (/tmp/seed/source/frontend/node_modules/webpack/lib/Compiler.js:257:39)
at /tmp/seed/source/frontend/node_modules/webpack/lib/Compiler.js:273:13
at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/seed/source/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
at AsyncSeriesHook.lazyCompileHook (/tmp/seed/source/frontend/node_modules/tapable/lib/Hook.js:154:20)
at onCompiled (/tmp/seed/source/frontend/node_modules/webpack/lib/Compiler.js:271:21)
at /tmp/seed/source/frontend/node_modules/webpack/lib/Compiler.js:681:15
at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/seed/source/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/tmp/seed/source/frontend/node_modules/tapable/lib/Hook.js:154:20)
at /tmp/seed/source/frontend/node_modules/webpack/lib/Compiler.js:678:31
at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/seed/source/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/tmp/seed/source/frontend/node_modules/tapable/lib/Hook.js:154:20)
at /tmp/seed/source/frontend/node_modules/webpack/lib/Compilation.js:1423:35
at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/seed/source/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/tmp/seed/source/frontend/node_modules/tapable/lib/Hook.js:154:20)
at /tmp/seed/source/frontend/node_modules/webpack/lib/Compilation.js:1414:32
Read more here: <https://cra.link/failed-to-minify>
ERROR: Failed to run: cd frontend && npm install && npm run build
Build v14 completed in 5m 57s. Used 0 build minutes.
SST builds in Seed are free!
Garret Harp
03/11/2022, 8:24 AMFrank
Call retries were exceeded
error seems like an out of memory issue. Using a larger build machine like @Garret Harp suggested should get around this issue.Frank
Bryan Smith
03/11/2022, 3:28 PMBryan Smith
03/11/2022, 3:52 PM