angular-cli: ng build --prod crashes at 10%

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Angular CLI: 1.5.0
Node: 8.7.0
OS: darwin x64
Angular: 5.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic, router

@angular/cdk: 5.0.0-rc0
@angular/cli: 1.5.0
@angular/material: 5.0.0-rc0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.2
typescript: 2.6.1
webpack: 3.8.1

Repro steps.

ng build --prod crashes at the following stage: 10% building modules 7/7 modules 0 active

process just exists with no error

The log given by the failure.

Desired functionality.

Mention any other details that might be useful.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

I’ve been having the same issue (crashing at 10%). Reading at the comments written by the angular team on ./src/app/environment.ts it says that if you run ng build --env=prod it will use environment.prod.ts. So I trie to run ng build --env=prod instead of ng build -prod and work. I hope this to solve your problem, leave me a comment about how it went.

@PillowPillow i cannot thank you enough! Found two rouge folders that ended with .ts and once renaming them project builds again!

You are a life saver!

Erf, your issue is surely related but it seems that directories with dots works if the part after the dot isn’t an extension. I created a repo sample with my issue : repo, it crashes at 10% like yours.

👍

Seeing same issue, works without --prod flag. Only log seen is:

10% building modules 4/4 modules 0 active

Project: https://github.com/terrandominion/app.angular.cli.ts Travis log: https://travis-ci.org/terrandominion/app.angular.cli.ts/jobs/299854705