Closed vella-nicholas closed 2 years ago
Looks like NGCC is crashing. Transferring to the FW repo for a better triage.
Looks like NGCC is crashing. Transferring to the FW repo for a better triage.
Thanks @alan-agius4 ... Are there any commands I can run to pull more metrics please, maybe I can identify the package which is givning me issues?
Hi @vella-nicholas,
@petebacondarwin noticed that between the last NGCC message and the crash almost two hours has elapsed.
2021-10-18T07:11:20.6582607Z Compiling @angular/platform-browser-dynamic/testing : es2015 as esm2015
2021-10-18T07:13:09.8937190Z
2021-10-18T07:13:09.8973541Z <--- Last few GCs --->
I think for starters what you can do it to try to run the build with verbose logging using the --verbose
flag.
What is also interesting is that NGCC is picking up @angular/platform-browser-dynamic/testing
as being a dependency of your application. This shouldn't be the case as this entry-point should only be used for testing purposes and setups.
Hi @vella-nicholas,
@petebacondarwin noticed that between the last NGCC message and the crash almost two hours has elapsed.
2021-10-18T07:11:20.6582607Z Compiling @angular/platform-browser-dynamic/testing : es2015 as esm2015 2021-10-18T07:13:09.8937190Z 2021-10-18T07:13:09.8973541Z <--- Last few GCs --->
I think for starters what you can do it to try to run the build with verbose logging using the
--verbose
flag.What is also interesting is that NGCC is picking up
@angular/platform-browser-dynamic/testing
as being a dependency of your application. This shouldn't be the case as this entry-point should only be used for testing purposes and setups.
It is 2 minutes, not 2 hours, the time is 07:11:20.6582607 and the crash is 07:13:09.8973541Z.
As for @angular/platform-browser-dynamic/testing, this one baffles me too, it is only used in a test.ts file required by karma config. The funny thing is this, if I remove any reference to platform-browser-dynamic/testing the build gets stuck in @angular/compiler/testing, if I remove that reference it gets stuck on @angular/platform-browser/testing (so on and so forth). I will retry the build with --verbose on and post it in a different comment.
As for @angular/platform-browser-dynamic/testing, this one baffles me too, it is only used in a test.ts file required by karma config. The funny thing is this, if I remove any reference to platform-browser-dynamic/testing the build gets stuck in @angular/compiler/testing, if I remove that reference it gets stuck on @angular/platform-browser/testing (so on and so forth). I will retry the build with --verbose on and post it in a different comment.
Ummm so maybe it's something other than NGCC, which is crashing the build. Those logs would be great thanks :)
I think at this point is to try and provide as much as info as possible. I will start off by angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"nextwork": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"allowedCommonJsDependencies": [
"hammerjs",
"webcola",
"firebase/app",
"@firebase/app",
"@firebase/firestore",
"@firebase/component",
"@firebase/util",
"dagre",
"rxjs",
"rxjs-compat",
"@fullcalendar/daygrid",
"@fullcalendar/timegrid",
"@fullcalendar/interaction",
"chart.js"
],
"outputPath": "public",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico",
{
"glob": "**/*",
"input": "node_modules/ngx-auth-firebaseui/assets/",
"output": "./assets/"
},
{
"glob": "**/*",
"input": "node_modules/ngx-monaco-editor/assets/monaco",
"output": "./assets/monaco/"
}
],
"styles": [
"node_modules/flag-icon-css/css/flag-icon.min.css",
"node_modules/instantsearch.css/themes/algolia.css",
"src/styles.scss"
],
"scripts": [
"node_modules/prismjs/prism.js",
"node_modules/prismjs/components/prism-typescript.js"
],
"aot": false,
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
},
"staging": {
"optimization": true,
"outputHashing": "all",
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"verbose": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.staging.ts"
}
]
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "nextwork:build"
},
"configurations": {
"production": {
"browserTarget": "nextwork:build:production"
},
"staging": {
"browserTarget": "nextwork:build:staging"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "nextwork:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "src/karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [
"src/styles.scss"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": []
}
}
}
},
"nextwork-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "nextwork:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "nextwork",
"cli": {
"analytics": false
}
}
tsconfig:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"module": "esnext",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowJs": true,
"forceConsistentCasingInFileNames": false,
"target": "es2015",
"skipLibCheck": true,
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2019",
"dom"
],
"paths": {
"@shared/*": [
"src/app/shared/*"
],
"@shared": [
"src/app/shared"
]
}
},
"angularCompilerOptions": {
"enableIvy": true
},
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
}
GCP Build with verbose on (something seems off as the logs do not seem too verbose in my opinion):
starting build "2ccef26e-2464-4d07-82a2-e14a715eff22"
FETCHSOURCE
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /workspace/.git/
From https://github.com/bw-gaming/bluewindow-vulcan
* branch d4fedb5d5fd33ad84776e27c8f98ca752c5e30a4 -> FETCH_HEAD
HEAD is now at d4fedb5 Verbose = true (for real this time)
BUILD
Starting Step #0
Step #0: Pulling image: node:16.9.1-alpine3.11
Step #0: 16.9.1-alpine3.11: Pulling from library/node
Step #0: 6a428f9f83b0: Pulling fs layer
Step #0: c46c3665f3e1: Pulling fs layer
Step #0: f284663d3eaa: Pulling fs layer
Step #0: aceca668727d: Pulling fs layer
Step #0: aceca668727d: Waiting
Step #0: f284663d3eaa: Verifying Checksum
Step #0: f284663d3eaa: Download complete
Step #0: 6a428f9f83b0: Verifying Checksum
Step #0: 6a428f9f83b0: Download complete
Step #0: aceca668727d: Verifying Checksum
Step #0: aceca668727d: Download complete
Step #0: 6a428f9f83b0: Pull complete
Step #0: c46c3665f3e1: Verifying Checksum
Step #0: c46c3665f3e1: Download complete
Step #0: c46c3665f3e1: Pull complete
Step #0: f284663d3eaa: Pull complete
Step #0: aceca668727d: Pull complete
Step #0: Digest: sha256:70d7c386b79755bf2179aeb691d926fc04c52b21b1224350c09d928e98d2dd04
Step #0: Status: Downloaded newer image for node:16.9.1-alpine3.11
Step #0: docker.io/library/node:16.9.1-alpine3.11
Step #0: npm WARN old lockfile
Step #0: npm WARN old lockfile The package-lock.json file was created with an old version of npm,
Step #0: npm WARN old lockfile so supplemental metadata must be fetched from the registry.
Step #0: npm WARN old lockfile
Step #0: npm WARN old lockfile This is a one-time fix-up, please be patient...
Step #0: npm WARN old lockfile
Step #0: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
Step #0: npm WARN deprecated uuid@3.3.3: 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.
Step #0: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
Step #0: npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
Step #0: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
Step #0: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
Step #0: npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
Step #0: npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
Step #0: 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.
Step #0: npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
Step #0: npm WARN deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
Step #0: 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.
Step #0: npm WARN deprecated core-js@2.6.12: core-js@<3.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. Please, upgrade your dependencies to the actual version of core-js.
Step #0:
Step #0: added 2309 packages, and audited 2310 packages in 2m
Step #0:
Step #0: 158 packages are looking for funding
Step #0: run `npm fund` for details
Step #0:
Step #0: 31 vulnerabilities (8 moderate, 23 high)
Step #0:
Step #0: To address issues that do not require attention, run:
Step #0: npm audit fix
Step #0:
Step #0: Some issues need review, and may require choosing
Step #0: a different dependency.
Step #0:
Step #0: Run `npm audit` for details.
Finished Step #0
Starting Step angular/angular#1
Step angular/angular#1: Already have image: node:16.9.1-alpine3.11
Step angular/angular#1:
Step angular/angular#1: > nextwork@1.5.1 staging
Step angular/angular#1: > ng build --configuration=staging
Step angular/angular#1:
Step angular/angular#1: - Generating browser application bundles (phase: setup)...
Step angular/angular#1: Compiling @angular/core : es2015 as esm2015
Step angular/angular#1: Compiling @angular/common : es2015 as esm2015
Step angular/angular#1: Compiling @angular/platform-browser : es2015 as esm2015
Step angular/angular#1: Compiling @angular/animations : es2015 as esm2015
Step angular/angular#1: Compiling @angular/animations/browser : es2015 as esm2015
Step angular/angular#1: Compiling @angular/platform-browser/animations : es2015 as esm2015
Step angular/angular#1: Compiling @angular/cdk/portal : es2015 as esm2015
Step angular/angular#1: Compiling @swimlane/ngx-charts : es2015 as esm2015
Step angular/angular#1: Compiling @swimlane/ngx-graph : es2015 as esm2015
Step angular/angular#1: Compiling @angular/flex-layout/core : es2015 as esm2015
Step angular/angular#1: Compiling @angular/flex-layout/extended : es2015 as esm2015
Step angular/angular#1: Compiling @angular/cdk/bidi : es2015 as esm2015
Step angular/angular#1: Compiling @angular/flex-layout/flex : es2015 as esm2015
Step angular/angular#1: Compiling @angular/flex-layout/grid : es2015 as esm2015
Step angular/angular#1: Compiling @angular/flex-layout : es2015 as esm2015
Step angular/angular#1: Compiling ng-keyboard-shortcuts : es2015 as esm2015
Step angular/angular#1: Compiling @angular/forms : es2015 as esm2015
Step angular/angular#1: Compiling ngx-monaco-editor : es2015 as esm2015
Step angular/angular#1: Compiling primeng/utils : es2015 as esm2015
Step angular/angular#1: Compiling @angular/router : es2015 as esm2015
Step angular/angular#1: Compiling primeng/api : es2015 as esm2015
Step angular/angular#1: Compiling @angular/cdk/platform : es2015 as esm2015
Step angular/angular#1: Compiling @angular/cdk/collections : es2015 as esm2015
Step angular/angular#1: Compiling @angular/cdk/scrolling : es2015 as esm2015
Step angular/angular#1: Compiling primeng/dom : es2015 as esm2015
Step angular/angular#1: Compiling primeng/tooltip : es2015 as esm2015
Step angular/angular#1: Compiling primeng/ripple : es2015 as esm2015
Step angular/angular#1: Compiling primeng/dropdown : es2015 as esm2015
Step angular/angular#1: Compiling primeng/paginator : es2015 as esm2015
Step angular/angular#1: Compiling primeng/inputtext : es2015 as esm2015
Step angular/angular#1: Compiling primeng/button : es2015 as esm2015
Step angular/angular#1: Compiling primeng/selectbutton : es2015 as esm2015
Step angular/angular#1: Compiling primeng/tristatecheckbox : es2015 as esm2015
Step angular/angular#1: Compiling primeng/calendar : es2015 as esm2015
Step angular/angular#1: Compiling primeng/inputnumber : es2015 as esm2015
Step angular/angular#1: Compiling primeng/table : es2015 as esm2015
Step angular/angular#1: Compiling primeng/multiselect : es2015 as esm2015
Step angular/angular#1: Compiling primeng/inputswitch : es2015 as esm2015
Step angular/angular#1: Compiling primeng/focustrap : es2015 as esm2015
Step angular/angular#1: Compiling primeng/dialog : es2015 as esm2015
Step angular/angular#1: Compiling primeng/inputmask : es2015 as esm2015
Step angular/angular#1: Compiling primeng/confirmdialog : es2015 as esm2015
Step angular/angular#1: Compiling primeng/progressspinner : es2015 as esm2015
Step angular/angular#1: Compiling primeng/togglebutton : es2015 as esm2015
Step angular/angular#1: Compiling primeng/dynamicdialog : es2015 as esm2015
Step angular/angular#1: Compiling primeng/scrollpanel : es2015 as esm2015
Step angular/angular#1: Compiling primeng/checkbox : es2015 as esm2015
Step angular/angular#1: Compiling primeng/fieldset : es2015 as esm2015
Step angular/angular#1: Compiling primeng/tabview : es2015 as esm2015
Step angular/angular#1: Compiling primeng/card : es2015 as esm2015
Step angular/angular#1: Compiling primeng/message : es2015 as esm2015
Step angular/angular#1: Compiling primeng/panel : es2015 as esm2015
Step angular/angular#1: Compiling primeng/toast : es2015 as esm2015
Step angular/angular#1: Compiling primeng/breadcrumb : es2015 as esm2015
Step angular/angular#1: Compiling primeng/chips : es2015 as esm2015
Step angular/angular#1: Compiling primeng/autocomplete : es2015 as esm2015
Step angular/angular#1: Compiling primeng/listbox : es2015 as esm2015
Step angular/angular#1: Compiling primeng/contextmenu : es2015 as esm2015
Step angular/angular#1: Compiling primeng/overlaypanel : es2015 as esm2015
Step angular/angular#1: Compiling primeng/blockui : es2015 as esm2015
Step angular/angular#1: Compiling primeng/radiobutton : es2015 as esm2015
Step angular/angular#1: Compiling primeng/accordion : es2015 as esm2015
Step angular/angular#1: Compiling primeng/carousel : es2015 as esm2015
Step angular/angular#1: Compiling primeng/chart : es2015 as esm2015
Step angular/angular#1: Compiling primeng/codehighlighter : es2015 as esm2015
Step angular/angular#1: Compiling primeng/colorpicker : es2015 as esm2015
Step angular/angular#1: Compiling primeng/dataview : es2015 as esm2015
Step angular/angular#1: Compiling primeng/messages : es2015 as esm2015
Step angular/angular#1: Compiling primeng/progressbar : es2015 as esm2015
Step angular/angular#1: Compiling @angular/common/http : es2015 as esm2015
Step angular/angular#1: Compiling primeng/fileupload : es2015 as esm2015
Step angular/angular#1: Compiling primeng/fullcalendar : es2015 as esm2015
Step angular/angular#1: Compiling primeng/galleria : es2015 as esm2015
Step angular/angular#1: Compiling primeng/inplace : es2015 as esm2015
Step angular/angular#1: Compiling primeng/inputtextarea : es2015 as esm2015
Step angular/angular#1: Compiling primeng/lightbox : es2015 as esm2015
Step angular/angular#1: Compiling primeng/megamenu : es2015 as esm2015
Step angular/angular#1: Compiling primeng/menubar : es2015 as esm2015
Step angular/angular#1: Compiling @angular/cdk/keycodes : es2015 as esm2015
Step angular/angular#1: Compiling @angular/cdk/observers : es2015 as esm2015
Step angular/angular#1: Compiling @angular/cdk/a11y : es2015 as esm2015
Step angular/angular#1: Compiling @angular/cdk/drag-drop : es2015 as esm2015
Step angular/angular#1: Compiling primeng/orderlist : es2015 as esm2015
Step angular/angular#1: Compiling primeng/organizationchart : es2015 as esm2015
Step angular/angular#1: Compiling primeng/panelmenu : es2015 as esm2015
Step angular/angular#1: Compiling primeng/password : es2015 as esm2015
Step angular/angular#1: Compiling primeng/picklist : es2015 as esm2015
Step angular/angular#1: Compiling primeng/rating : es2015 as esm2015
Step angular/angular#1: Compiling primeng/sidebar : es2015 as esm2015
Step angular/angular#1: Compiling primeng/slidemenu : es2015 as esm2015
Step angular/angular#1: Compiling primeng/slider : es2015 as esm2015
Step angular/angular#1: Compiling primeng/menu : es2015 as esm2015
Step angular/angular#1: Compiling primeng/splitbutton : es2015 as esm2015
Step angular/angular#1: Compiling primeng/steps : es2015 as esm2015
Step angular/angular#1: Compiling primeng/tabmenu : es2015 as esm2015
Step angular/angular#1: Compiling primeng/terminal : es2015 as esm2015
Step angular/angular#1: Compiling primeng/tieredmenu : es2015 as esm2015
Step angular/angular#1: Compiling primeng/toolbar : es2015 as esm2015
Step angular/angular#1: Compiling primeng/tree : es2015 as esm2015
Step angular/angular#1: Compiling primeng/treetable : es2015 as esm2015
Step angular/angular#1: Compiling primeng/virtualscroller : es2015 as esm2015
Step angular/angular#1: Compiling primeng/divider : es2015 as esm2015
Step angular/angular#1: Compiling primeng/confirmpopup : es2015 as esm2015
Step angular/angular#1: Compiling primeng/dragdrop : es2015 as esm2015
Step angular/angular#1: Compiling primeng/tag : es2015 as esm2015
Step angular/angular#1: Compiling @ngx-pwa/local-storage : es2015 as esm2015
Step angular/angular#1: Compiling ngx-window-token : es2015 as esm2015
Step angular/angular#1: Compiling ngx-clipboard : es2015 as esm2015
Step angular/angular#1: Compiling ngx-trim-directive : es2015 as esm2015
Step angular/angular#1: Compiling ngx-csv-parser : es2015 as esm2015
Step angular/angular#1: Compiling ngx-store : es2015 as esm2015
Step angular/angular#1: Compiling ngx-editor/utils : es2015 as esm2015
Step angular/angular#1: Compiling ngx-editor/schema : es2015 as esm2015
Step angular/angular#1: Compiling ngx-editor/helpers : es2015 as esm2015
Step angular/angular#1: Compiling ngx-editor/commands : es2015 as esm2015
Step angular/angular#1: Compiling ngx-editor : es2015 as esm2015
Step angular/angular#1: Compiling @kolkov/angular-editor : es2015 as esm2015
Step angular/angular#1: Compiling @angular/core/testing : es2015 as esm2015
Step angular/angular#1: Compiling @angular/platform-browser-dynamic : es2015 as esm2015
Step angular/angular#1: Compiling @angular/platform-browser/testing : es2015 as esm2015
Step angular/angular#1: Compiling @angular/compiler/testing : es2015 as esm2015
Step angular/angular#1: Compiling @angular/platform-browser-dynamic/testing : es2015 as esm2015
Step angular/angular#1:
Step angular/angular#1: <--- Last few GCs --->
Step angular/angular#1:
Step angular/angular#1: [20:0x5615adde2040] 437422 ms: Scavenge (reduce) 1945.7 (1996.9) -> 1945.1 (1996.9) MB, 9.6 / 0.0 ms (average mu = 0.287, current mu = 0.271) allocation failure
Step angular/angular#1: [20:0x5615adde2040] 437440 ms: Scavenge (reduce) 1946.0 (1996.9) -> 1945.4 (1996.9) MB, 13.1 / 0.0 ms (average mu = 0.287, current mu = 0.271) allocation failure
Step angular/angular#1: [20:0x5615adde2040] 437472 ms: Scavenge (reduce) 1946.3 (1996.9) -> 1945.6 (1996.9) MB, 27.5 / 0.0 ms (average mu = 0.287, current mu = 0.271) allocation failure
Step angular/angular#1:
Step angular/angular#1:
Step angular/angular#1: <--- JS stacktrace --->
Step angular/angular#1:
Step angular/angular#1: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Step angular/angular#1: npm ERR! path /workspace
Step angular/angular#1: npm ERR! command failed
Step angular/angular#1: npm ERR! signal SIGABRT
Step angular/angular#1: npm ERR! command sh -c ng build --configuration=staging
Step angular/angular#1:
Step angular/angular#1: npm ERR! A complete log of this run can be found in:
Step angular/angular#1: npm ERR! /builder/home/.npm/_logs/2021-10-18T14_21_11_216Z-debug.log
Finished Step angular/angular#1
ERROR
ERROR: build step 1 "node:16.9.1-alpine3.11" failed: step exited with non-zero status: 1
@vella-nicholas, by verbose I meant running the Angular CLI in verbose mode ie:
ng build --configuration=staging --verbose
@vella-nicholas, by verbose I meant running the Angular CLI in verbose mode ie:
ng build --configuration=staging --verbose
I did that to be honest but did not log anything on GCP, I will try again using GH Actions. In the mean time I shared some config which can help in investigating my issue because I cannot understand why this is happening.
I ran ng build --configuration=staging --verbose
locally. No errors (the issue is only on CI pipeline). I am sharing a link to the log file (too long for comments). Can you confirm you can access the file please: https://filebin.net/yyphqp0qdv6hwuoy
Looking at that log. It seems like ngcc completed on a previous build, so is not having to run again. It might be worth reinstalling node_modules, and then doing a clean build again with the verbose logging to see where ngcc fits in this.
Looking at that log. It seems like ngcc completed on a previous build, so is not having to run again. It might be worth reinstalling node_modules, and then doing a clean build again with the verbose logging to see where ngcc fits in this.
@petebacondarwin You can use the same link to download logs_build_v2 (https://filebin.net/yyphqp0qdv6hwuoy). Did a hard delete of npm_modules, npm i -f
and ran ng build --configuration=staging --verbose &> logs_build_v2.txt
Interesting to note that the crash (in your CI) is occurring between these two logs:
Compiling @angular/platform-browser-dynamic/testing : es2015 as esm2015
β Browser application bundle generation complete.
I suspect that ngcc is not the point of failure here. More likely there is some aspect of the ngc build, perhaps, that is using too much memory.
Interesting to note that the crash (in your CI) is occurring between these two logs:
Compiling @angular/platform-browser-dynamic/testing : es2015 as esm2015 β Browser application bundle generation complete.
I suspect that ngcc is not the point of failure here. More likely there is some aspect of the ngc build, perhaps, that is using too much memory.
Do you have any suggestions how can I proceed?
What is also interesting is that NGCC is picking up
@angular/platform-browser-dynamic/testing
as being a dependency of your application. This shouldn't be the case as this entry-point should only be used for testing purposes and setups.
Is there anyway I can remove this dependency from the main build? Because it does not make sense to me either.
The build works now. I achieved this by setting "sourceMap": false
. I believe I have solved the issue like this.
Generating source-maps can be very memory intensive, since source-maps tend to be very large when being processed. The downside of turning this off is that exceptions and debugging in production code is less pleasant. But it should have no effect on the behaviour of the app.
Generating source-maps can be very memory intensive, since source-maps tend to be very large when being processed. The downside of turning this off is that exceptions and debugging in production code is less pleasant. But it should have no effect on the behaviour of the app.
I still believe this is not the optimal solution. Anything I can do to maybe profile this issue please?
You could try running the build locally via the Chrome devtools and doing some memory tracing. This might indicate how much memory is required and where it is occuring.
Is it possible to increase the resources available in your Cloud (even just temporarily) to see what amount of memory is needed?
You could try running the build locally via the Chrome devtools and doing some memory tracing. This might indicate how much memory is required and where it is occuring.
Is it possible to increase the resources available in your Cloud (even just temporarily) to see what amount of memory is needed?
I increased node memory on GCP to 8GB and the build did not complete after 3 hours. I will try Chrome devtools and post results.
You could try running the build locally via the Chrome devtools and doing some memory tracing. This might indicate how much memory is required and where it is occuring.
Is it possible to increase the resources available in your Cloud (even just temporarily) to see what amount of memory is needed?
What am I supposed to be on the look out for using DevTools? Individual components? Is there no way for me to measure how much memory various steps of the build take?
I was thinking you could view the "memory metrics" - see https://developer.chrome.com/docs/devtools/evaluate-performance/reference/#memory
From the version output in the original report, it appears that the @angular-devkit/build-angular
package is outdated compared to the rest of the Angular CLI packages:
@angular-devkit/build-angular 12.1.1
@angular-devkit/core 12.2.10
The @angular-devkit/build-angular
package contains the majority of the build pipeline. Can you try synchronizing that package's version with the others (all 12.2.10)?
From the version output in the original report, it appears that the
@angular-devkit/build-angular
package is outdated compared to the rest of the Angular CLI packages:@angular-devkit/build-angular 12.1.1 @angular-devkit/core 12.2.10
The
@angular-devkit/build-angular
package contains the majority of the build pipeline. Can you try synchronizing that package's version with the others (all 12.2.10)?
I will try that thanks and get back to you with the result.
From the version output in the original report, it appears that the
@angular-devkit/build-angular
package is outdated compared to the rest of the Angular CLI packages:@angular-devkit/build-angular 12.1.1 @angular-devkit/core 12.2.10
The
@angular-devkit/build-angular
package contains the majority of the build pipeline. Can you try synchronizing that package's version with the others (all 12.2.10)?
Updating this version seemed to have solved the problem. Many thanks! EDIT: Also for the record I used version 12.1.1 because it was the version auto updated with ng update.
Closing as issue is resolved as per above comment.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
π Bug report
After updating to Angular 12, CI build does not work anymore on Cloud Provider (both GCP or GH Actions)
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: CI Build worked fine with Angular 11.
Description
After updating to Angular12, the CI build pipeline is causing memory overflow errors.
π¬ Minimal Reproduction
npm run staging
, which translates tong build --staging
π₯ Exception or Error
π Your Environment