Our Angular CLI source build passed in 186 seconds, then the test command failed after 243 seconds. Use Angular CLI for an Angular application whose team wants shared workspace and generation conventions. Choose other tooling for a non-Angular application or a team that wants to own its build configuration directly. The application package and the CLI contributor checkout answer different setup questions.
What people use angular-cli for
Angular CLI creates application workspaces and generates project files; three accounts show how developers have used those commands. The Angular CLI README describes initializing, developing, scaffolding and maintaining Angular applications. The accounts below add specific working choices: accepting a generated starting point, choosing application options, and combining the CLI with a separate library process. Each account belongs to its author's environment and period.
- Martin Hochel's May 2016 Angular Attack account describes a four-person team using Angular 2, Firebase, Angular Material and ngRx. He credited the CLI with easy scaffolding and test setup, then described configuring dependencies through SystemJS. The concrete tradeoff was between generating the starting files and doing additional configuration when adding packages.
- The AngularStart author creates applications with SCSS, routing, standalone components and inline templates and styles. The article shows an explicit ng new configuration and explains that developers can create later components manually or use ng generate. Workspace creation and individual file generation are separate choices within that workflow.
- GitHub commenter mattem described their company's investment in Angular 4 and the CLI while maintaining a custom process for building and testing component libraries. The company hoped integrated library tooling would replace that process. This records an adoption decision involving both application tooling and reusable packages, rather than a claim about the current library feature set.
What happened when we ran it
Our November 30, 2026 source run installed in 18 seconds, built in 186 seconds and failed tests after 243 seconds at commit 1e4b096. The recorded source measurements describe the CLI repository itself. The checkout contained 2,198 files, approximately 235,907 source lines and 11.1 MB of checked-out files. Installation recorded 1,554 dependencies occupying 994 MB, substantially more disk space than the checkout alone.
| Source checkout step | Our result | What the result answers |
|---|---|---|
| Install with pnpm | Succeeded in 18 seconds; 1,554 dependencies; 994 MB | Dependencies installed in the configured source sandbox. |
| Build | Succeeded in 186 seconds | The recorded source build completed. |
| Tests | Failed with exit 1 after 243 seconds | The test command ended unsuccessfully. |
The source sandbox configuration specified 3 CPUs, 8 GB RAM and image lab-node:22. The failing log tail names passing webpack and schematics targets, including the schematics test target at 26.7 seconds. It then marks //packages/angular/build:test NO STATUS. The following lines are quoted together because the summary and the failed command are both part of our source result:
Executed 82 out of 99 tests: 81 tests pass and 18 were skipped.
[ELIFECYCLE] Test failed. See above for more details.
The same tail warns that some specified test sizes are too large and names --test_verbose_timeout_warnings for further detail. A failed exit status, passing targets and a target without a status all appear in this output. We retain the summary as written rather than deriving a pass percentage from its accounting. The source scan also found five CI workflow files, a tests directory and monorepo workspaces, with no Dockerfile detected.
The separate quickstart run used commit 1e4b0960d804 in a fresh unprivileged lab-node:22 container with 2 CPUs, 4 GB RAM, no published ports and no secrets. Its clone step took 2 seconds. The global package installation recorded @angular/cli 22.3.0, 76.1 MB and 11.4 seconds. Those package measurements belong to the quickstart probe, separately from the pnpm source installation above.
| Quickstart question | Answer | Verdict | Why |
|---|---|---|---|
| Did the repository clone? | Clone completed in 2 seconds. | Completed | The clone step recorded completion. |
| Did the README's global installation run? | Installed @angular/cli 22.3.0; 76.1 MB in 11.4 seconds. | Completed | The installation step recorded the package and size. |
| Did the CLI return a version? | ng --version returned 22.3.0 in 0.8 seconds, exit 0. | Completed | The version command returned successfully. |
| Did command help work? | ng --help returned command descriptions in 0.5 seconds, exit 0. | Completed | Help listed commands including ng add, ng analytics and ng build. |
| Did the usage recipe continue? | It found no runnable ng command in the README's usage/examples sections. | Failed step | The recipe stopped at command discovery. |
| Did teardown complete? | teardown: ok | Completed | The cleanup record reports success. |
The CLI returned 22.3.0 in 0.8 seconds, and help returned command descriptions in 0.5 seconds. The usage step failed at README command discovery. The README places ng new and ng serve under "Setting Up a Project", so the stopped recipe is a heading-selection failure rather than an application crash. The run ended with successful teardown.
Where people get stuck: match the error to the version
Issue #7113 records a CLI 1.3.1 user still seeing a dependency error, while other commenters reported success with enhanced-resolve 3.3.0. That distinction makes the dependency tree part of the diagnosis. The thread's resolver reports describe generated app.module.ngfactory resolution failures and individual workarounds. A top-level CLI version alone did not describe every package involved in the reported failure.
| Report and affected context | What people reported | Reported outcome |
|---|---|---|
| #5618, CLI 1.0-era AOT builds | JavaScript heap exhaustion; users discussed the npm launcher actually used by their shell. | One commenter completed a build after changing ng.cmd under AppData; Node used around 4 GB RAM. |
| #13734, Angular 7/8 builds | Heap exhaustion during production builds; the original reporter said a 4096 MB allowance still failed. | Other commenters reported larger-heap workarounds. |
| #7113, CLI 1.2/1.3-era AOT builds | Generated app.module.ngfactory output could not be resolved. | Multiple commenters credited enhanced-resolve 3.3.0. |
| #9550, CLI 1.6.8 | ng serve failed at 95% with TypeError: callbacks[i] is not a function. | The issue is closed. |
| #10624, CLI 6 updates | Private-package access failed during ng update despite working through npm. | Timebutt reported removing registry configuration and private references temporarily, then restoring them. |
| #5053, an existing-project upgrade | ng build or ng serve raised Cannot read property 'length' of undefined. | Individual commenters reported configuration or TypeScript changes. |
| #1050, early Angular 2 Universal integration | The client showed its starter message; the server raised a drive-letter protocol error on Windows. | The reporter said changing Node and starting only the Universal server still produced the error. |
Timebutt's private-registry workaround changed both .npmrc and package.json before running the update. It is an attributed account of how that user generated angular.json, rather than an instruction to remove an organization's registry controls. For an upgrade investigation, retain the command, lockfile, registry configuration and complete error together. That preserves the difference between npm fetching a package and the CLI performing a migration.
Production builds do more work than development reloads
Angular's repository guide says ng build defaults to production configuration with AOT compilation, minification and tree-shaking. AOT compiles Angular templates before the application runs; the other optimizations reduce delivered code. The application-builder guide names @angular/build:application and esbuild. A production build therefore performs a different task from serving an application during development, even when both commands operate on the same workspace.
In issue #6795, filipesilva described additional production optimization passes and recommended CLI 1.6.0 for a webpack production-build fix. One commenter reported a change from about 55 seconds to about 45 seconds for a small project without CSS processing; another still reported slow builds. Source maps also appeared in the discussion. They connect generated JavaScript to original code for debugging, so omitting them changes an output as well as build work.
The early rebuild discussion in #1980 covered asset copying, source-map configuration and a proposal to separate vendor code. A maintainer described replacing CopyWebpackPlugin with glob copying, and one commenter reported faster rebuilding in beta.17. These accounts identify concrete work outside the edited component. They also show why a useful slowdown report includes the builder, configuration and kind of build, rather than only the time since a file was saved.
Deployment needs another package and host-specific choices
Angular's guide requires a deployment builder before ng deploy, while angular-cli-ghpages publishes static output through a separate package. The Angular deployment example adds a builder before deploying. Application compilation, deployment integration and hosting are separate parts of that workflow. Choosing Angular CLI establishes the workspace commands; choosing a deployment builder establishes how those commands connect to a particular publishing service.
The angular-cli-ghpages guidance says GitHub Pages supports static files and excludes SSR/Universal build targets. SSR renders pages in a server process for incoming requests. The same guidance describes a 404.html workaround for single-page application routing on GitHub Pages, with responses still carrying HTTP status 404. It says a 404.html file disables native SPA handling on Cloudflare Pages. These are host and deployment-package behaviors.
The standalone deployment documentation describes selecting the build directory, including dist/PROJECTNAME/browser for the application output layout it discusses. Its standalone mode expects a separate build; ng deploy provides automatic build integration. That gives teams a concrete choice: schedule the build through the integrated command, or publish an already-produced directory. The directory selection determines which files are sent to the deployment branch.
The v3.1.2 release notes describe a repeat-deployment regression affecting 3.0.3 through 3.1.1. A second deployment removed .nojekyll, letting Jekyll drop underscore-prefixed files and folders. The notes say 3.1.2 preserves .nojekyll and CNAME and tell affected users to deploy again with 3.1.2. A useful deployment acceptance check therefore includes the deployed branch, a deep application URL and its HTTP status after a repeat deployment.
Angular CLI vs webpack, manual files and standalone ghpages
Choose Angular CLI for a shared Angular workspace, manual files for learning their wiring, and standalone ghpages for publishing an existing static build. These choices cover different responsibilities. AngularStart discusses choosing between manual files and generators within a CLI project, while the ghpages documentation distinguishes a standalone publishing command from integrated deployment. The webpack README describes a module bundler, placing it at another level of the workflow.
| Choice | Evidence-backed role | Pick it when |
|---|---|---|
| Angular CLI | The README documents initializing, developing, scaffolding and maintaining Angular applications. | Your application is Angular and your team wants its workspace conventions. |
| webpack with npm scripts | webpack bundles browser JavaScript and other assets; Hochel favored direct configuration in his 2016 comparison. | Your team wants to configure the bundler and own the surrounding scripts. |
| Manual component and service files | AngularStart discusses manual creation alongside ng generate. | Understanding or controlling the file wiring is the immediate goal. |
| Standalone angular-cli-ghpages | Its documentation separates building from publishing a chosen output directory. | A static build already exists and publishing that directory is the task. |
| StackBlitz tutorial | Angular's setup guide offers browser learning before local setup. | You want to learn Angular before installing its local tools. |
webpack's README says it bundles JavaScript for browsers and can transform or package other assets. That role differs from the Angular workspace workflow documented in the CLI README. Meanwhile, AngularStart presents manual creation and generation as choices within an application. Selecting manual files does not require abandoning the workspace, just as selecting standalone deployment does not replace application creation.
Outdated claims, corrected
Angular's modern guide names an esbuild application builder, while Hochel's 2016 review describes SystemJS configuration. The SystemJS dependency instructions in Hochel's review belong to that original workflow. The modern application-builder description supplies the correction for a reader choosing tooling now. Both sources are useful when their architectural statements stay attached to the period they describe.
The same review's quoted statement that there were no webpack plans was followed by robwormald's explanation that the CLI switched to webpack. The sequence is SystemJS-era review, later webpack discussion, then the modern esbuild application-builder guide. Reading those as a sequence avoids treating either historical statement as a current builder reference. A workspace's configured builder remains the concrete setting to inspect when investigating its behavior.
The standalone ghpages description of default .nojekyll creation also needs its release history. The 3.1.2 notes identify the second-deploy removal in 3.0.3 through 3.1.1 and describe preserving the file on redeployment. That correction changes the deployment check: creation during the first publish and preservation during a later publish are separate outcomes. The relevant package version belongs beside the deployment result.
FAQ
The README installs Angular CLI with npm install -g @angular/cli, then creates a workspace with ng new and runs it with ng serve. Those commands appear under "Setting Up a Project" in the Angular CLI README. Angular's local setup guide identifies Node.js and npm as dependencies and also offers a browser tutorial for readers who want to begin before installing local tools.
How do I install Angular CLI and verify its version?
The README documents npm install -g @angular/cli; our quickstart probe returned 22.3.0 from ng --version. The version record reports exit 0 in 0.8 seconds. For application creation, follow the README's sequence of ng new, entering the project directory and ng serve. The local setup guide explains the Node.js and npm prerequisites for that application workflow.
Why does my Angular production or AOT build run out of JavaScript heap memory?
Issues #5618 and #13734 record heap exhaustion in CLI 1.0-era and Angular 7/8 builds. In #5618, a commenter completed a build after changing the actual npm launcher. In #13734, the original reporter said a 4096 MB heap allowance still failed. The error identifies memory exhaustion; the command, dependency versions and build configuration provide the context needed to investigate a particular occurrence.
Where do I add the Node heap-size option so Angular CLI actually uses it?
Issue #5618 includes a successful change to ng.cmd under AppData, the launcher used in that Windows report. The commenter reported Node using around 4 GB RAM and completing the build. That account makes launcher selection part of the investigation. Record which executable the shell invokes before changing a file, so the attempted heap setting can be connected to the process that runs the CLI.
Why are Angular CLI rebuilds slow after a small file change?
Issue #1980 discusses asset copying and source-map work in early webpack-beta rebuilds. One reporter described waiting more than 10 seconds after saving a file. The thread's concrete diagnostic paths concern work performed by that build pipeline beyond compiling the edited component. Capture the builder and build configuration alongside the edit and elapsed time so the reported delay identifies a reproducible operation.
Can separating vendor code from application code speed up development rebuilds?
Commenter intellix proposed DLL loading for vendor items in issue #1980. The comment asks whether vendor loading would help, alongside discussion of asset copying and source maps. The actionable distinction is between a proposed change and a timed result. A comparison would need the same application and configuration before and after the vendor-code change to answer that performance question directly.
Why is a production build much slower than a development build?
Maintainer filipesilva attributed additional production-build work to optimization passes in issue #6795. The modern Angular guide lists AOT, minification and tree-shaking in production defaults. In the historical thread, CLI 1.6.0 improved one user's time from about 55 to 45 seconds, while another still reported slow builds. Configuration and application scope therefore belong beside each reported duration.
How do source maps affect production build time and memory?
Source-map generation appears in both the production-build discussion and the Angular 7/8 heap reports. Commenters in #6795 associated source maps with additional build work, while the #13734 discussion concerns production memory failures. Source maps also provide debugging information linking generated output to original code. Removing that output changes what a release contains as well as the work its build performs.
Why does ng serve fail at 95% with callbacks[i] is not a function?
Issue #9550 reports that exception with Angular CLI 1.6.8, Angular 5.2.4, Node 9.5.0 and webpack 3.10.0. The issue's version list and title identify that environment and error. The useful diagnostic is the exception together with its dependency versions, rather than the progress percentage alone. Preserve those details when comparing another workspace with the report.
Should I revert Angular CLI when a previously working development server suddenly fails?
A commenter in issue #9550 asked whether to revert to a previous version. The thread concerns the CLI 1.6.8 development-server failure. Comparing the previous lockfile and configuration with the failing state gives that question a concrete experiment. Changing only a declared CLI version can leave other resolved dependencies different, as the separate resolver discussion in issue #7113 illustrates.
How do I fix an AOT build that cannot resolve app.module.ngfactory?
CLI 1.2/1.3-era commenters in issue #7113 reported success with enhanced-resolve 3.3.0. One commenter named Ubuntu Server and that resolver version; another said the same version worked. The thread also includes a user already fixed on CLI 1.3.1 who still saw the error. Keep the resolver workaround attached to that historical dependency environment when using the discussion to diagnose an old workspace.
Why does ng update fail with private npm registries when npm install works?
Issue #10624 reports private-package failures in the CLI 6 update path despite successful npm access. Timebutt described removing .npmrc and private dependencies temporarily, then restoring them. That report separates package fetching from migration behavior. For an organization's upgrade, record both operations with its registry configuration so a successful npm installation is not mistaken for a completed CLI migration.
What does Cannot read property 'length' of undefined mean during ng build or ng serve?
Issue #5053 reports this message after upgrading an existing Windows project, including TypeScript to 2.1.6. The report names both ng serve and ng build, and commenters described configuration and compiler-dependency changes. Preserve the full stack trace and upgrade diff alongside the message. That connects the exception to the affected configuration rather than treating a property name as a complete diagnosis.
What we have not tested yet
Our November 30 checks reached a source build and CLI version/help output, but stopped before running a generated application. Application startup, browser behavior, deployment, repeat deployment, private-registry migrations, current rebuild speed and source-map memory on a representative project remain outside these checks. There is no measured current comparison with webpack or a custom build. Historical issue outcomes and workarounds apply to their reported environments; closed issues #9550, #5053 and #1050 lack a definitive resolution in the extracts read here.
The source test tail omits the diagnostic needed to explain the failure or the application-build target's missing status. The lab-node:22 label does not establish actual Node or operating-system versions. Raw toolchain logs and complete test output are needed for those questions. The inventory of five CI workflow files describes repository contents rather than successful CI execution. Security, network traffic, telemetry defaults and generated-application secret handling were also outside the assessment.
The autocomplete record contains angular-cli mcp, alongside angular-cli and angular-cli-ghpages. Those query strings establish neither search demand nor MCP capabilities. The video entries contain no transcript, and the Bilibili search results add no demonstrated application outcome. The November 30 GitHub snapshot records a push that day and a latest release of v22.3.0 dated November 19; repository activity alone does not measure adoption, support quality or application reliability.
Setup ease, documentation accuracy across complete workflows, community support quality and production maturity remain unassessed. The source installation and build completed, but the source test command failed and the application recipe stopped. The README and guides describe commands and integrations; historical issues show specific reports and replies. Those observations support the workflow distinctions in this review without supplying numerical ratings for outcomes the runs did not cover.


