I am developing a system using Angular CLI: 17.3.9 and Node: 18.13.0. After finishing the development, when I run the command,
ng build
or
ng build --verbose
or
ng run build
the build process begins but never completes. It seems to stop halfway through and doesn’t create the dist folder. The output looks like this:
You can read more about direct eval and bundling here: https://esbuild.github.io/link/direct-eval
⠴ Building...
server.mjs 1.1mb
chunk-WZ3DHEP6.mjs 923.4kb
chunk-6XD5BRK7.mjs 908.8kb
chunk-JGCTGG76.mjs 522.4kb
chunk-E5ACJJW7.mjs 11.8kb
chunk-H6KHSOBK.mjs 2.8kb
chunk-W6O7R4GF.mjs 2.2kb
render-utils.server.mjs 1.5kb
main.server.mjs 212b
chunk-CC4B4WUG.mjs 121b
- I’ve attempted to run the build commands (ng build, ng build –verbose, ng run build), but the process stops partway through with no dist folder generated.
- I’ve also checked for possible memory issues or system limitations but didn’t find any clear signs.
- I expected the build process to complete successfully, creating the necessary output files in the dist folder, but it halts at the point mentioned above without producing the output.
My angular.json file contains,
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"reffelsystem": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": [],
"server": "src/main.server.ts",
"prerender": true,
"ssr": {
"entry": "server.ts"
}
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "reffelsystem:build:production"
},
"development": {
"buildTarget": "reffelsystem:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "reffelsystem:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
}
},
"cli": {
"analytics": "f2af7aa0-94ef-4a1c-b2d7-7794087581ee",
"schematicCollections": [
"@angular-eslint/schematics"
]
}
}
and my package.json file is,
{
"name": "reffelsystem",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"serve:ssr:reffelsystem": "node dist/reffelsystem/server/server.mjs",
"lint": "ng lint"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.0",
"@angular/common": "^17.3.0",
"@angular/compiler": "^17.3.0",
"@angular/core": "^17.3.0",
"@angular/fire": "^17.1.0",
"@angular/forms": "^17.3.0",
"@angular/platform-browser": "^17.3.0",
"@angular/platform-browser-dynamic": "^17.3.0",
"@angular/platform-server": "^17.3.0",
"@angular/router": "^17.3.0",
"@angular/ssr": "^17.3.2",
"express": "^4.18.2",
"firebase": "^10.13.1",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"uuid": "^10.0.0",
"zone.js": "~0.14.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.2",
"@angular-eslint/builder": "17.5.3",
"@angular-eslint/eslint-plugin": "17.5.3",
"@angular-eslint/eslint-plugin-template": "17.5.3",
"@angular-eslint/schematics": "17.5.3",
"@angular-eslint/template-parser": "17.5.3",
"@angular/cli": "^17.3.2",
"@angular/compiler-cli": "^17.3.0",
"@types/express": "^4.17.17",
"@types/jasmine": "~5.1.0",
"@types/node": "^18.18.0",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "7.11.0",
"@typescript-eslint/parser": "7.11.0",
"eslint": "^8.57.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.4.2"
}
}
2