Angular Build getting failed with below issues
`√ Browser application bundle generation complete.
Initial chunk files | Names | Raw size
styles.css, styles.js | styles | 531.96 kB |
scripts.js | scripts | 282.56 kB |
polyfills.js | polyfills | 228.53 kB |
vendor.js | vendor | 227.83 kB |
runtime.js | runtime | 6.52 kB |
main.js | main | 876 bytes |
| Initial total | 1.25 MB
Build at: 2024-05-16T10:20:58.313Z - Hash: 1f386b80c55bca7b - Time: 42309ms
./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Maximum call stack size exceeded
./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Maximum call stack size exceeded
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
`
tsconfig.app.json
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts"
],
"include": [
"src/**/*.d.ts"
]
}
tsconfig.json
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2022",
"module": "ES2022",
"lib": [
"es2022",
"dom"
],
"resolveJsonModule": true,
"useDefineForClassFields": false,
"skipLibCheck": true
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true,
"strictPropertyInitialization": false
}
}
tsconfig.spec.json
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine"
]
},
"files": [
"src/test.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
}
Package.json
{
"name": "webaccess-app",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.9",
"@angular/cdk": "^17.2.0",
"@angular/common": "^17.3.9",
"@angular/compiler": "^17.2.0",
"@angular/core": "^17.3.9",
"@angular/forms": "^17.2.0",
"@angular/material": "^17.2.0",
"@angular/platform-browser": "^17.2.0",
"@angular/platform-browser-dynamic": "^17.2.0",
"@angular/router": "^17.2.0",
"@ngtools/webpack": "^17.3.7",
"@types/quill": "^1.3.10",
"bootstrap": "^4.6.2",
"echarts": "^5.5.0",
"jquery": "^3.7.1",
"jsencrypt": "^3.3.2",
"ng-click-outside": "^8.0.0",
"ng-otp-input": "^1.9.3",
"ng-sidebar": "^9.4.3",
"ngx-mask": "^12.0.0",
"ngx-quill": "^25.3.2",
"ngx-smart-popover": "^1.5.0",
"ngx-toastr": "^13.2.1",
"quill": "^2.0.2",
"rxjs": "^7.8.1",
"tslib": "^2.6.2",
"xlsx": "^0.18.5",
"xng-breadcrumb": "^11.0.0",
"zone.js": "~0.14.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.2.0",
"@angular/cli": "^17.2.0",
"@angular/compiler-cli": "^17.2.0",
"@types/jasmine": "^3.10.18",
"@types/jquery": "^3.5.30",
"@types/node": "^12.20.55",
"ajv": "^8.12.0",
"codelyzer": "^6.0.2",
"jasmine-core": "~5.1.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "^6.4.3",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~5.3.2"
}
}
Have tried the below thing to build/run the application locally
- we have migrated the application from angular 14 to 17
- while tring to build the application getting this error
some one please review these error statements and config details and please do the needfull
Thanks Regards
Ajith