analogjs / analog

The fullstack meta-framework for Angular. Powered by Vite and Nitro
https://analogjs.org
MIT License
2.61k stars 251 forks source link

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory #816

Closed d-koppenhagen closed 5 months ago

d-koppenhagen commented 11 months ago

Please provide the environment you discovered this bug in.

See: https://github.com/d-koppenhagen/k9n.dev

Which area/package is the issue in?

platform

Description

When trying to deploy on Netlify or Render as described in the docs, I run into an issue when the static sites are generated.

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Please provide the exception or error you saw

7:16:47 AM: ✓ built in 10.67s
7:16:47 AM: Prerendering static pages...
7:16:49 AM: Building Server...
7:17:25 AM: <--- Last few GCs --->
7:17:25 AM: [4185:0x67c1870]    90703 ms: Scavenge (reduce) 2025.1 (2078.0) -> 2024.8 (2078.3) MB, 2.0 / 0.0 ms  (average mu = 0.506, current mu = 0.256) allocation failure;
7:17:25 AM: [4185:0x67c1870]    91837 ms: Mark-sweep (reduce) 2026.9 (2079.8) -> 2026.4 (2080.5) MB, 1023.6 / 0.0 ms  (average mu = 0.296, current mu = 0.111) allocation failure; GC in old space requested
7:17:25 AM: <--- JS stacktrace --->
7:17:25 AM: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
7:17:25 AM:  1: 0xb95b60 node::Abort() [ng build]
7:17:25 AM:  2: 0xa9a7f8  [ng build]
7:17:25 AM:  3: 0xd6f2f0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [ng build]
7:17:25 AM:  4: 0xd6f697 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [ng build]
7:17:25 AM:  5: 0xf4cba5  [ng build]
7:17:25 AM:  6: 0xf5f08d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [ng build]
7:17:25 AM:  7: 0xf3978e v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [ng build]
7:17:25 AM:  8: 0xf3ab57 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [ng build]
7:17:25 AM:  9: 0xf1bd2a v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [ng build]
7:17:25 AM: 10: 0x12e130d v8::internal::Runtime_AllocateInOldGeneration(int, unsigned long*, v8::internal::Isolate*) [ng build]
7:17:25 AM: 11: 0x170deb9  [ng build]
7:17:26 AM: Aborted (core dumped)
7:17:26 AM: ​
7:17:26 AM: "build.command" failed                                        
7:17:26 AM: ────────────────────────────────────────────────────────────────
7:17:26 AM: ​
7:17:26 AM:   Error message
7:17:26 AM:   Command failed with exit code 134: npm run build (https://ntl.fyi/exit-code-134)
7:17:26 AM: ​
7:17:26 AM:   Error location
7:17:26 AM:   In Build command from Netlify app:
7:17:26 AM:   npm run build
7:17:26 AM: ​
7:17:26 AM:   Resolved config
7:17:26 AM:   build:
7:17:26 AM:     command: npm run build
7:17:26 AM:     commandOrigin: ui
7:17:26 AM:     publish: /opt/build/repo/dist/analog/public
7:17:26 AM:     publishOrigin: ui
7:17:26 AM:   functionsDirectory: /opt/build/repo/dist/analog
7:17:27 AM: Failed during stage "building site": Build script returned non-zero exit code: 2
7:17:27 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:17:27 AM: Failing build: Failed to build site
7:17:27 AM: Finished processing build request in 2m10.395s

Other information

probably related to #107.

I would be willing to submit a PR to fix this issue

luishcastroc commented 9 months ago

Hi #107 seems to be solved can you confirm if this is still an issue?

d-koppenhagen commented 9 months ago

It still seems to be an issue. Just tried it for render.com with the same error.

brandonroberts commented 7 months ago

@d-koppenhagen is this still an issue?

d-koppenhagen commented 7 months ago

yes, just tried it with latest version of vite and analog@1.1.2 using netlify.

Repo: https://github.com/d-koppenhagen/k9n.dev

Job-Log: https://app.netlify.com/sites/k9n-dev/deploys/661426856d9a230008d57426

7:17:59 PM: Netlify Build                                                 
7:17:59 PM: ────────────────────────────────────────────────────────────────
7:17:59 PM: ​
7:17:59 PM: ❯ Version
7:17:59 PM:   @netlify/build 29.39.0
7:17:59 PM: ​
7:17:59 PM: ❯ Flags
7:17:59 PM:   baseRelDir: true
7:17:59 PM:   buildId: 661426856d9a230008d57424
7:17:59 PM:   deployId: 661426856d9a230008d57426
7:17:59 PM: ​
7:17:59 PM: ❯ Current directory
7:17:59 PM:   /opt/build/repo
7:17:59 PM: ​
7:17:59 PM: ❯ Config file
7:17:59 PM:   No config file was defined: using default values.
7:17:59 PM: ​
7:17:59 PM: ❯ Context
7:17:59 PM:   production
7:17:59 PM: ​
7:17:59 PM: Build command from Netlify app                                
7:17:59 PM: ────────────────────────────────────────────────────────────────
7:17:59 PM: ​
7:17:59 PM: $ npm run build
7:17:59 PM: > d-koppenhagen-website@0.0.0 build
7:17:59 PM: > ng build
7:18:04 PM: vite v5.2.8 building for production...
7:18:08 PM: transforming...
7:19:21 PM: DEPRECATION WARNING: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
7:19:21 PM: Recommendation: math.div(20em, 16) or calc(20em / 16)
7:19:21 PM: More info and automated migrator: https://sass-lang.com/d/slash-div
7:19:21 PM:    ╷
7:19:21 PM: 12 │ $fa-fw-width:          (20em / 16);
7:19:21 PM:    │                         ^^^^^^^^^
7:19:21 PM:    ╵
7:19:21 PM:     node_modules/@fortawesome/fontawesome-free/scss/_variables.scss 12:25  @import
7:19:21 PM:     node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss 5:9   @import
7:19:21 PM:     src/styles.scss 23:9                                                   root stylesheet
7:19:21 PM: DEPRECATION WARNING: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
7:19:21 PM: Recommendation: math.div(4em, 3) or calc(4em / 3)
7:19:21 PM: More info and automated migrator: https://sass-lang.com/d/slash-div
7:19:21 PM:   ╷
7:19:21 PM: 6 │   font-size: (4em / 3);
7:19:21 PM:   │               ^^^^^^^
7:19:21 PM:   ╵
7:19:21 PM:     node_modules/@fortawesome/fontawesome-free/scss/_larger.scss 6:15     @import
7:19:21 PM:     node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss 8:9  @import
7:19:21 PM:     src/styles.scss 23:9                                                  root stylesheet
7:19:21 PM: DEPRECATION WARNING: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
7:19:21 PM: Recommendation: math.div(3em, 4) or calc(3em / 4)
7:19:21 PM: More info and automated migrator: https://sass-lang.com/d/slash-div
7:19:21 PM:   ╷
7:19:21 PM: 7 │   line-height: (3em / 4);
7:19:21 PM:   │                 ^^^^^^^
7:19:21 PM:   ╵
7:19:21 PM:     node_modules/@fortawesome/fontawesome-free/scss/_larger.scss 7:17     @import
7:19:21 PM:     node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss 8:9  @import
7:19:21 PM:     src/styles.scss 23:9                                                  root stylesheet
7:19:22 PM: DEPRECATION WARNING: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
7:19:22 PM: Recommendation: math.div($fa-li-width * 5, 4) or calc($fa-li-width * 5 / 4)
7:19:22 PM: More info and automated migrator: https://sass-lang.com/d/slash-div
7:19:22 PM:   ╷
7:19:22 PM: 6 │   margin-left: $fa-li-width * 5/4;
7:19:22 PM:   │                ^^^^^^^^^^^^^^^^^^
7:19:22 PM:   ╵
7:19:22 PM:     node_modules/@fortawesome/fontawesome-free/scss/_list.scss 6:16        @import
7:19:22 PM:     node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss 10:9  @import
7:19:22 PM:     src/styles.scss 23:9                                                   root stylesheet
7:19:22 PM: DEPRECATION WARNING: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
7:19:22 PM: Recommendation: math.div(_size(element-margin), 4) or calc(_size(element-margin) / 4)
7:19:22 PM: More info and automated migrator: https://sass-lang.com/d/slash-div
7:19:22 PM:     ╷
7:19:22 PM: 188 │   padding: (_size(element-margin) / 4) 0 (_size(element-margin) / 4)
7:19:22 PM:     │             ^^^^^^^^^^^^^^^^^^^^^^^^^
7:19:22 PM:     ╵
7:19:22 PM:     src/sass/base/_typography.scss 188:13  @import
7:19:22 PM:     src/styles.scss 105:9                  root stylesheet
7:19:23 PM: WARNING: 3 repetitive deprecation warnings omitted.
7:19:34 PM: ✓ 2158 modules transformed.
7:19:35 PM: rendering chunks...
7:19:36 PM: computing gzip size...
7:19:37 PM: dist/client/index.html                                                            4.34 kB │ gzip:   1.21 kB
7:19:37 PM: dist/client/assets/fa-regular-400-DGzu1beS.woff2                                 13.22 kB
7:19:37 PM: dist/client/assets/fa-regular-400-DFnMcJPd.woff                                  16.28 kB
7:19:37 PM: dist/client/assets/fa-regular-400-D1vz6WBx.ttf                                   33.74 kB
7:19:37 PM: dist/client/assets/fa-regular-400-BhTwtT8w.eot                                   34.03 kB
7:19:37 PM: dist/client/assets/fa-brands-400-UxlILjvJ.woff2                                  76.74 kB
7:19:37 PM: dist/client/assets/fa-solid-900-BUswJgRo.woff2                                   78.27 kB
7:19:37 PM: dist/client/assets/fa-brands-400-CEJbCg16.woff                                   89.99 kB
7:19:37 PM: dist/client/assets/fa-solid-900-DOXgCApm.woff                                   101.65 kB
7:19:37 PM: dist/client/assets/fa-brands-400-CSYNqBb_.ttf                                   133.99 kB
7:19:37 PM: dist/client/assets/fa-brands-400-DnkPfk3o.eot                                   134.29 kB
7:19:37 PM: dist/client/assets/fa-regular-400-gwj8Pxq-.svg                                  144.71 kB │ gzip:  36.98 kB
7:19:37 PM: dist/client/assets/fa-solid-900-mxuxnBEa.ttf                                    202.74 kB
7:19:37 PM: dist/client/assets/fa-solid-900-B6Axprfb.eot                                    203.03 kB
7:19:37 PM: dist/client/assets/fa-brands-400-cH1MgKbP.svg                                   747.93 kB │ gzip: 253.41 kB
7:19:37 PM: dist/client/assets/fa-solid-900-B4ZZ7kfP.svg                                    918.99 kB │ gzip: 254.77 kB
7:19:37 PM: dist/client/assets/index-DihFBU5N.css                                           286.69 kB │ gzip:  39.44 kB
7:19:37 PM: dist/client/assets/array-BKyUJesY.js                                              0.09 kB │ gzip:   0.10 kB
7:19:37 PM: dist/client/assets/clone-2UCgRNNW.js                                              0.09 kB │ gzip:   0.11 kB
7:19:37 PM: dist/client/assets/channel-8YmvPVFc.js                                            0.12 kB │ gzip:   0.13 kB
7:19:37 PM: dist/client/assets/init-Gi6I4Gst.js                                               0.15 kB │ gzip:   0.13 kB
7:19:37 PM: dist/client/assets/Tableau10-B-NsZVaP.js                                          0.19 kB │ gzip:   0.18 kB
7:19:37 PM: dist/client/assets/index.page-jcd9KRoz.js                                         0.28 kB │ gzip:   0.24 kB
7:19:37 PM: dist/client/assets/index.page-BjXy-Tif.js                                         0.74 kB │ gzip:   0.51 kB
7:19:37 PM: dist/client/assets/index.page-CPulpDG-.js                                         0.74 kB │ gzip:   0.51 kB
7:19:37 PM: dist/client/assets/flowDiagram-v2-3b53844e-CqSmqwQl.js                            0.77 kB │ gzip:   0.45 kB
7:19:37 PM: dist/client/assets/2021-11-angular13-CvkVwCv9.js                                  0.81 kB │ gzip:   0.46 kB
7:19:37 PM: dist/client/assets/2023-10-vue2-vue3-migration-ghEtmnfz.js                        0.84 kB │ gzip:   0.49 kB
7:19:37 PM: dist/client/assets/2020-11-angular11-Buf48vN9.js                                  0.84 kB │ gzip:   0.49 kB
7:19:37 PM: dist/client/assets/2020-06-angular10-DIERNnsc.js                                  0.84 kB │ gzip:   0.49 kB
7:19:37 PM: dist/client/assets/2021-06-angular12-DS5JUrSJ.js                                  0.85 kB │ gzip:   0.49 kB
7:19:37 PM: dist/client/assets/2020-02-angular9-oM_pWspT.js                                   0.86 kB │ gzip:   0.51 kB
7:19:37 PM: dist/client/assets/2023-05-angular16-BjV3hzQT.js                                  0.91 kB │ gzip:   0.52 kB
7:19:37 PM: dist/client/assets/2024-01-16-accessibility-in-angular-B9n6VFIL.js                0.93 kB │ gzip:   0.54 kB
7:19:37 PM: dist/client/assets/2023-11-20-einfuehrung-barrierefreiheit-web-7Jn2EJ6_.js        0.95 kB │ gzip:   0.59 kB
7:19:37 PM: dist/client/assets/line-BTMWYG8p.js                                               0.95 kB │ gzip:   0.47 kB
7:19:37 PM: dist/client/assets/2023-11-angular17-Cj5W0f_2.js                                  0.96 kB │ gzip:   0.53 kB
7:19:37 PM: dist/client/assets/2022-06-angular14-B9jIM-67.js                                  0.97 kB │ gzip:   0.55 kB
7:19:37 PM: dist/client/assets/2022-11-angular15-BI3k6DOU.js                                  0.98 kB │ gzip:   0.54 kB
7:19:37 PM: dist/client/assets/2020-03-12-dotfiles-C4GIWxJL.js                                1.01 kB │ gzip:   0.54 kB
7:19:37 PM: dist/client/assets/2019-11-20-angular-tag-cloud-module-LhOOO40-.js                1.17 kB │ gzip:   0.57 kB
7:19:37 PM: dist/client/assets/ordinal-Cboi1Yqb.js                                            1.19 kB │ gzip:   0.57 kB
7:19:37 PM: dist/client/assets/2020-02-26-scully-plugin-toc-CJV1ZRb_.js                       1.28 kB │ gzip:   0.67 kB
7:19:37 PM: dist/client/assets/2021-09-14-ngx-lipsum-B4E6W6sU.js                              1.29 kB │ gzip:   0.70 kB
7:19:37 PM: dist/client/assets/2020-02-02-vscode-file-tree-to-text-generator-CKvukptL.js      1.32 kB │ gzip:   0.67 kB
7:19:37 PM: dist/client/assets/svgDrawCommon-5ccd53ef-ocXqPBK_.js                             1.34 kB │ gzip:   0.58 kB
7:19:37 PM: dist/client/assets/2023-04-05-vue3-openlayers-DM0K7_T3.js                         1.40 kB │ gzip:   0.71 kB
7:19:37 PM: dist/client/assets/2020-04-09-ngx-semantic-version-Be-K7NQW.js                    1.69 kB │ gzip:   0.76 kB
7:19:37 PM: dist/client/assets/2023-12-29-analog-publish-gh-pages-DwBJBEvM.js                 2.10 kB │ gzip:   1.06 kB
7:19:37 PM: dist/client/assets/index.page-CSlkFHm9.js                                         2.22 kB │ gzip:   1.21 kB
7:19:37 PM: dist/client/assets/path-CbwjOpE9.js                                               2.28 kB │ gzip:   0.99 kB
7:19:37 PM: dist/client/assets/2020-09-12-scully-plugin-mermaid-DUtaka5v.js                   2.36 kB │ gzip:   1.03 kB
7:19:37 PM: dist/client/assets/meta.service-CvuIxYH1.js                                       2.58 kB │ gzip:   0.84 kB
7:19:37 PM: dist/client/assets/_slug_.page-BtBUVPjZ.js                                        2.60 kB │ gzip:   1.33 kB
7:19:37 PM: dist/client/assets/twitter-timeline.component-J_b4BZSj.js                         2.92 kB │ gzip:   1.34 kB
7:19:37 PM: dist/client/assets/2020-05-22-vscode-code-review-CGbHoTRw.js                      2.94 kB │ gzip:   1.38 kB
7:19:37 PM: dist/client/assets/index.page-C2t-LJSS.js                                         3.06 kB │ gzip:   1.62 kB
7:19:37 PM: dist/client/assets/arc-DN_6xOGj.js                                                3.47 kB │ gzip:   1.50 kB
7:19:37 PM: dist/client/assets/stateDiagram-v2-9a9d610d-bngWtwmz.js                           5.13 kB │ gzip:   2.45 kB
7:19:37 PM: dist/client/assets/classDiagram-v2-f2df5561-azfImhbU.js                           5.17 kB │ gzip:   2.34 kB
7:19:37 PM: dist/client/assets/index.page-UssytKFT.js                                         5.36 kB │ gzip:   2.53 kB
7:19:37 PM: dist/client/assets/_slug_.page-DArsEiXK.js                                        5.71 kB │ gzip:   2.22 kB
7:19:37 PM: dist/client/assets/preview.component-tYAbRR3P.js                                  6.37 kB │ gzip:   2.21 kB
7:19:37 PM: dist/client/assets/_slug_.page-Dg6NVh4K.js                                        7.25 kB │ gzip:   2.55 kB
7:19:37 PM: dist/client/assets/infoDiagram-bcd20f53-Dka3pxA7.js                               8.63 kB │ gzip:   3.25 kB
7:19:37 PM: dist/client/assets/classDiagram-30eddba6-CbaXBBkh.js                              9.28 kB │ gzip:   2.89 kB
7:19:37 PM: dist/client/assets/stateDiagram-0ff1cf1a-CzHW6H1y.js                             10.16 kB │ gzip:   3.53 kB
7:19:37 PM: dist/client/assets/2020-03-dig-deeper-into-scully-ssg-1S7Hg7AQ.js                10.16 kB │ gzip:   3.93 kB
7:19:37 PM: dist/client/assets/linear-CJxTYnIM.js                                            10.17 kB │ gzip:   4.26 kB
7:19:37 PM: dist/client/assets/styles-3ed67cfa-D7Vf06yX.js                                   10.36 kB │ gzip:   3.82 kB
7:19:37 PM: dist/client/assets/2022-12-vue-route-based-nav-menu-CN_oY9Bj.js                  11.35 kB │ gzip:   4.00 kB
7:19:37 PM: dist/client/assets/index-fc10efb0-C746yyKe.js                                    12.27 kB │ gzip:   4.25 kB
7:19:37 PM: dist/client/assets/2019-11-ngx-semantic-version-CyT6mkVq.js                      12.73 kB │ gzip:   4.63 kB
7:19:37 PM: dist/client/assets/pieDiagram-79897490-ummEqNGl.js                               15.04 kB │ gzip:   5.65 kB
7:19:37 PM: dist/client/assets/sticky-navigation.component-DOE9LwRy.js                       17.69 kB │ gzip:   5.37 kB
7:19:37 PM: dist/client/assets/graph-DLsL-5_4.js                                             17.75 kB │ gzip:   6.41 kB
7:19:37 PM: dist/client/assets/2020-01-angular-scully-BEQn3jIw.js                            19.66 kB │ gzip:   7.32 kB
7:19:37 PM: dist/client/assets/sankeyDiagram-97764748-ZEiBOk6b.js                            21.12 kB │ gzip:   7.71 kB
7:19:37 PM: dist/client/assets/journeyDiagram-4fe6b3dc-CQg9Jf-m.js                           21.73 kB │ gzip:   7.66 kB
7:19:37 PM: dist/client/assets/flowDiagram-5540d9b9-C--XbsUS.js                              21.96 kB │ gzip:   7.24 kB
7:19:37 PM: dist/client/assets/timeline-definition-fea2a41d-BK9Mgojf.js                      22.66 kB │ gzip:   7.92 kB
7:19:37 PM: dist/client/assets/requirementDiagram-05bf5f74-Bcd5L4jT.js                       24.66 kB │ gzip:   8.47 kB
7:19:37 PM: dist/client/assets/styles-d20c7d72-CHdnYwIi.js                                   26.42 kB │ gzip:   8.44 kB
7:19:37 PM: dist/client/assets/2020-11-twa-BtHueoQR.js                                       27.42 kB │ gzip:   9.90 kB
7:19:37 PM: dist/client/assets/layout-C08woz5N.js                                            29.04 kB │ gzip:  10.61 kB
7:19:37 PM: dist/client/assets/quadrantDiagram-62f64e94-BdVA1u3Y.js                          29.45 kB │ gzip:   8.35 kB
7:19:37 PM: dist/client/assets/index.page-C1fPCRSf.js                                        29.46 kB │ gzip:  10.01 kB
7:19:37 PM: dist/client/assets/erDiagram-47591fe2-B2Vyao-E.js                                30.84 kB │ gzip:  10.01 kB
7:19:37 PM: dist/client/assets/2019-07-progressive-web-app-BmPgh-RF.js                       34.69 kB │ gzip:  12.19 kB
7:19:37 PM: dist/client/assets/edges-d32062c0-Pqv6n-zd.js                                    34.99 kB │ gzip:   9.03 kB
7:19:37 PM: dist/client/assets/xychartDiagram-ab372869-BlfUs_lt.js                           37.30 kB │ gzip:  10.43 kB
7:19:37 PM: dist/client/assets/blockDiagram-91b80b7a-C-kKYND0.js                             37.64 kB │ gzip:  12.03 kB
7:19:37 PM: dist/client/assets/styles-991ebdfc-DGrJl8bQ.js                                   37.86 kB │ gzip:  12.59 kB
7:19:37 PM: dist/client/assets/gitGraphDiagram-96e6b4ee-By_qdF2x.js                          38.78 kB │ gzip:  11.59 kB
7:19:37 PM: dist/client/assets/2020-09-angular-schematics-common-helpers-DxWlc1hO.js         43.61 kB │ gzip:  11.75 kB
7:19:37 PM: dist/client/assets/flowDb-4b19a42f-Cz4FpT0N.js                                   46.73 kB │ gzip:  15.27 kB
7:19:37 PM: dist/client/assets/ganttDiagram-9a3bba1f-SbnaUsKE.js                             60.05 kB │ gzip:  20.36 kB
7:19:37 PM: dist/client/assets/createText-6b48ae7d-Be6m5TEn.js                               60.20 kB │ gzip:  17.89 kB
7:19:37 PM: dist/client/assets/2020-08-my-development-setup-DW6YFyQJ.js                      63.05 kB │ gzip:  14.03 kB
7:19:37 PM: dist/client/assets/c4Diagram-b2a90758-C2q0t8hc.js                                68.45 kB │ gzip:  19.18 kB
7:19:37 PM: dist/client/assets/sequenceDiagram-acc0e65c-OQhla5Hy.js                          84.85 kB │ gzip:  24.38 kB
7:19:37 PM: dist/client/assets/mermaid.core-C9DwHPZ-.js                                     256.71 kB │ gzip:  71.94 kB
7:19:37 PM: dist/client/assets/katex-C4hv677G.js                                            260.93 kB │ gzip:  77.04 kB
7:19:37 PM: dist/client/assets/mindmap-definition-f354de21-DxPfy0EM.js                      471.81 kB │ gzip: 147.40 kB
7:19:37 PM: dist/client/assets/index-mQUUo390.js                                            662.76 kB │ gzip: 204.33 kB
7:19:37 PM: dist/client/assets/flowchart-elk-definition-5fe447d6-B3XNQSHt.js              1,448.88 kB │ gzip: 444.33 kB
7:19:37 PM: 
7:19:37 PM: (!) Some chunks are larger than 500 kB after minification. Consider:
7:19:37 PM: - Using dynamic import() to code-split the application
7:19:37 PM: - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
7:19:37 PM: - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
7:19:37 PM: ✓ built in 1m 32s
7:19:37 PM: Building SSR application...
7:19:37 PM: vite v5.2.8 building SSR bundle for production...
7:19:53 PM: transforming...
7:20:34 PM: ✓ 132 modules transformed.
7:20:34 PM: rendering chunks...
7:20:35 PM: dist/ssr/assets/2021-11-angular13-C33J3H6i.js                                  0.87 kB
7:20:35 PM: dist/ssr/assets/2020-02-angular9-C02o95gQ.js                                   0.90 kB
7:20:35 PM: dist/ssr/assets/2020-11-angular11-Bt2BjorZ.js                                  0.90 kB
7:20:35 PM: dist/ssr/assets/2020-06-angular10-pvUoJ3o0.js                                  0.91 kB
7:20:35 PM: dist/ssr/assets/2023-10-vue2-vue3-migration-BNTnFI-l.js                        0.92 kB
7:20:35 PM: dist/ssr/assets/2021-06-angular12-4zwWqOzY.js                                  0.92 kB
7:20:35 PM: dist/ssr/assets/2023-05-angular16-DjpB-t4K.js                                  0.98 kB
7:20:35 PM: dist/ssr/assets/2024-01-16-accessibility-in-angular-BC9r3ubx.js                1.03 kB
7:20:35 PM: dist/ssr/assets/2023-11-angular17-k9HjdDln.js                                  1.03 kB
7:20:35 PM: dist/ssr/assets/2022-06-angular14-DNGNAclF.js                                  1.03 kB
7:20:35 PM: dist/ssr/assets/2022-11-angular15-Hsa9PVNf.js                                  1.04 kB
7:20:35 PM: dist/ssr/assets/2023-11-20-einfuehrung-barrierefreiheit-web-C6B11uwe.js        1.05 kB
7:20:35 PM: dist/ssr/assets/2020-03-12-dotfiles-fn7X8iX3.js                                1.07 kB
7:20:35 PM: dist/ssr/assets/2019-11-20-angular-tag-cloud-module-qr2AQcD8.js                1.26 kB
7:20:35 PM: dist/ssr/assets/2020-02-26-scully-plugin-toc-DZIkWYJP.js                       1.36 kB
7:20:35 PM: dist/ssr/assets/2021-09-14-ngx-lipsum-Dz71Hoo8.js                              1.36 kB
7:20:35 PM: dist/ssr/assets/2020-02-02-vscode-file-tree-to-text-generator-BjY9bZyC.js      1.44 kB
7:20:35 PM: dist/ssr/assets/2023-04-05-vue3-openlayers-B7xfibLo.js                         1.48 kB
7:20:35 PM: dist/ssr/assets/index.page-D6IAk6O9.js                                         1.51 kB
7:20:35 PM: dist/ssr/assets/2020-04-09-ngx-semantic-version-DNQsjNw6.js                    1.79 kB
7:20:35 PM: dist/ssr/assets/2023-12-29-analog-publish-gh-pages-nW1lB989.js                 2.19 kB
7:20:35 PM: dist/ssr/assets/index.page-DAtNt9rA.js                                         2.35 kB
7:20:35 PM: dist/ssr/assets/index.page-C1FgrwKf.js                                         2.39 kB
7:20:35 PM: dist/ssr/assets/2020-09-12-scully-plugin-mermaid-pmgIAiYm.js                   2.48 kB
7:20:35 PM: dist/ssr/assets/twitter-timeline.component-Cx20jBy0.js                         2.91 kB
7:20:35 PM: dist/ssr/assets/2020-05-22-vscode-code-review-D-EYBwaH.js                      3.03 kB
7:20:35 PM: dist/ssr/assets/meta.service-qA4HNWIR.js                                       4.01 kB
7:20:35 PM: dist/ssr/assets/index.page-CBduqDaR.js                                         5.16 kB
7:20:35 PM: dist/ssr/assets/_slug_.page-BcgttHr3.js                                        5.66 kB
7:20:35 PM: dist/ssr/assets/index.page-DKTJOwDx.js                                         6.06 kB
7:20:35 PM: dist/ssr/assets/index.page-BwzO3SXe.js                                         7.77 kB
7:20:35 PM: dist/ssr/assets/2020-03-dig-deeper-into-scully-ssg-CkIuBZKy.js                10.33 kB
7:20:35 PM: dist/ssr/assets/preview.component-DGhQ9heK.js                                 11.11 kB
7:20:35 PM: dist/ssr/assets/2022-12-vue-route-based-nav-menu-i9ERmdVL.js                  11.60 kB
7:20:35 PM: dist/ssr/assets/_slug_.page-BCjVCZ_-.js                                       12.83 kB
7:20:35 PM: dist/ssr/assets/2019-11-ngx-semantic-version-2cr3b-uv.js                      12.92 kB
7:20:35 PM: dist/ssr/assets/_slug_.page-Br1s-z9o.js                                       14.59 kB
7:20:35 PM: dist/ssr/assets/2020-01-angular-scully-ulte0CGh.js                            19.98 kB
7:20:35 PM: dist/ssr/assets/2020-11-twa-qao5j96s.js                                       27.79 kB
7:20:35 PM: dist/ssr/assets/2019-07-progressive-web-app-DLxDQhKD.js                       35.02 kB
7:20:35 PM: dist/ssr/assets/xhr2-CDOpgsGh.js                                              36.45 kB
7:20:35 PM: dist/ssr/assets/sticky-navigation.component-BRKyHrwg.js                       40.86 kB
7:20:35 PM: dist/ssr/assets/2020-09-angular-schematics-common-helpers-BUB0DjpO.js         44.05 kB
7:20:35 PM: dist/ssr/assets/index.page-DwApq4c_.js                                        51.19 kB
7:20:35 PM: dist/ssr/assets/2020-08-my-development-setup-CD3Rwqdl.js                      63.43 kB
7:20:35 PM: dist/ssr/main.server.js                                                    1,775.97 kB
7:20:35 PM: ✓ built in 58.07s
7:20:36 PM: Prerendering static pages...
7:20:43 PM: Building Server...
7:20:54 PM: <--- Last few GCs --->
7:20:54 PM: [5716:0x6d1c850]   173162 ms: Mark-sweep 2029.7 (2090.4) -> 2027.9 (2090.4) MB, 947.7 / 0.0 ms  (average mu = 0.238, current mu = 0.060) allocation failure; scavenge might not succeed
7:20:54 PM: [5716:0x6d1c850]   174886 ms: Mark-sweep 2035.8 (2090.4) -> 2035.2 (2120.1) MB, 1719.2 / 0.0 ms  (average mu = 0.111, current mu = 0.002) allocation failure; scavenge might not succeed
7:20:54 PM: <--- JS stacktrace --->
7:20:54 PM: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
7:20:54 PM:  1: 0xb9a300 node::Abort() [ng build]
7:20:54 PM:  2: 0xaa0794  [ng build]
7:20:54 PM:  3: 0xd71e50 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [ng build]
7:20:54 PM:  4: 0xd721f7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [ng build]
7:20:54 PM:  5: 0xf4f5b5  [ng build]
7:20:54 PM:  6: 0xf61a8d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [ng build]
7:20:54 PM:  7: 0xf3c17e v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [ng build]
7:20:54 PM:  8: 0xf3d547 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [ng build]
7:20:54 PM:  9: 0xf1e74a v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [ng build]
7:20:54 PM: 10: 0x12e399f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [ng build]
7:20:54 PM: 11: 0x17106b9  [ng build]
7:20:55 PM: Aborted (core dumped)
7:20:55 PM: ​
7:20:55 PM: "build.command" failed                                        
7:20:55 PM: ────────────────────────────────────────────────────────────────
7:20:55 PM: ​
7:20:55 PM:   Error message
7:20:55 PM:   Command failed with exit code 134: npm run build (https://ntl.fyi/exit-code-134)
7:20:55 PM: ​
7:20:55 PM:   Error location
7:20:55 PM:   In Build command from Netlify app:
7:20:55 PM:   npm run build
7:20:55 PM: ​
7:20:55 PM:   Resolved config
7:20:55 PM:   build:
7:20:55 PM:     command: npm run build
7:20:55 PM:     commandOrigin: ui
7:20:55 PM:     publish: /opt/build/repo/dist/analog/public
7:20:55 PM:     publishOrigin: ui
7:20:55 PM:   functionsDirectory: /opt/build/repo/dist/analog
7:20:56 PM: Failed during stage "building site": Build script returned non-zero exit code: 2
7:20:56 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:20:56 PM: Failing build: Failed to build site
7:20:56 PM: Finished processing build request in 3m50.92s
alfredarcifa commented 6 months ago

Hello to everyone,

I should add that it also gives me the same problem in ci cd (gitlab).

I added a part of package.json "@analogjs/content": "^1.5.0-beta.3", "@analogjs/router": "^1.5.0-beta.3", "@angular/animations": "^18.0.0", "@angular/common": "^18.0.0", "@angular/compiler": "^18.0.0", "@angular/core": "^18.0.0", "@angular/forms": "^18.0.0", "@angular/platform-browser": "^18.0.0", "@angular/platform-browser-dynamic": "^18.0.0", "@angular/platform-server": "^18.0.0", "@angular/router": "^18.0.0",

ERROR

✓ built in 33.21s Prerendering static pages... Building Server... <--- Last few GCs ---> [245:0x6dc7330] 134316 ms: Scavenge 2031.8 (2081.3) -> 2030.4 (2081.3) MB, 6.43 / 0.00 ms (average mu = 0.303, current mu = 0.297) allocation failure; [245:0x6dc7330] 134337 ms: Scavenge 2032.5 (2081.8) -> 2031.2 (2081.8) MB, 6.11 / 0.00 ms (average mu = 0.303, current mu = 0.297) allocation failure; [245:0x6dc7330] 134418 ms: Scavenge 2033.1 (2082.1) -> 2031.7 (2086.1) MB, 11.83 / 0.00 ms (average mu = 0.303, current mu = 0.297) allocation failure; <--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0xc99970 node::Abort() [ng build] 2: 0xb6ffcb [ng build] 3: 0xebe9f0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [ng build] 4: 0xebecd7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [ng build] 5: 0x10d0785 [ng build] 6: 0x10d0d14 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [ng build] 7: 0x10e7c04 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [ng build] 8: 0x10e841c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [ng build] 9: 0x10be721 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [ng build] 10: 0x10bf8b5 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [ng build] 11: 0x109ce26 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [ng build] 12: 0x14f7c56 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [ng build] 13: 0x7f5affed9ef6 Aborted (core dumped)  ELIFECYCLE  Command failed with exit code 134.

brandonroberts commented 6 months ago

An option here is to add more memory with the build command you use

NODE_OPTIONS="--max-old-space-size=8192" npm run build

The example above assigns 8GB of memory to build. This depends on the resources available to your runner also. I'm not sure what resources are allocated to Gitlab CI runners

alfredarcifa commented 6 months ago

An option here is to add more memory with the build command you use

NODE_OPTIONS="--max-old-space-size=8192" npm run build

The example above assigns 8GB of memory to build. This depends on the resources available to your runner also. I'm not sure what resources are allocated to Gitlab CI runners

Thank you Brandon. As written on discord, the build is continuing. So memory problems overcome. Now let's see if I can finalise it.