angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Halting Problem at 95%. Shows emitting as the action doing.

Open tibinthomas opened this issue 8 years ago • 47 comments

I was hit by a problem like halting problem of truing machine while using the angular cli as follows. My script : node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build -e=prod --prod --sourcemap --vendor-chunk=true --build-optimizer

Versions

Angular CLI: 1.7.3
Node: 9.8.0
OS: win32 x64
Angular: 5.2.8
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cli: 1.7.3
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.4.0
webpack-bundle-analyzer: 2.11.1

Repro steps

Use this script : node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build -e=prod --prod --sourcemap --vendor-chunk=true --build-optimizer --stats-json

  • Apply the above script to any angular project.
  • If we replace --scourcemap with --no-souecemap the problem will not comes.

Observed behavior

The program is running indefinitely.

Desired behavior

The program should halt to say if there is some error in the script.

tibinthomas avatar Mar 16 '18 05:03 tibinthomas

Running into this as well on CLI 1.7.3 (Windows 10 x64, node 9.x). Prior version seem to work (cli 1.6.8). I think this may be related https://github.com/webpack/webpack/issues/2908

coryrylan avatar Mar 26 '18 19:03 coryrylan

I am experiencing this too with 1.7.3 on Windows 10. Build finishes normally if I remove --sourcemaps from parameters.

masysma avatar Mar 29 '18 12:03 masysma

Duplicate of #6795 (sourcemap problem on 1.7.x)

PS: Actually the original issue was possibly another thing, but last month of comments refer to the same thing as this one.

awerlang avatar Apr 03 '18 16:04 awerlang

same here in 6rc6 infite : 95% emitting index-html-webpack-plugin with this config:

 "optimization": true,
              "outputHashing": "none",
              "sourceMap": true,
              "extractCss": true,
              "namedChunks": false,
              "aot": true,
              "extractLicenses": true,
              "vendorChunk": true,
              "buildOptimizer": true

same problem if I set buildOptimizer to false!

ps: it working when set optimization to false 95% step if finish in 1 second

(version : nodejs10, npm6, win64, angular6rc5, cli6rc6)

cc @clydin

elvisbegovic avatar Apr 26 '18 12:04 elvisbegovic

Same issue here with Cli 6.0.0, I can only build if one of sourceMap or optimization is set to false.

raulalexe avatar May 11 '18 07:05 raulalexe

Samesies on moving from 1.7.4 to 6 to get more control over sourcemaps etc. for CD. Windows 10.

citygent avatar May 11 '18 12:05 citygent

Same as #10591

sluglit avatar May 11 '18 15:05 sluglit

+1

robport avatar May 14 '18 10:05 robport

+1, also having this problem when sourceMap is set to true

crunchyintheory avatar May 18 '18 02:05 crunchyintheory

I have the same issue when sourceMap = true on @angular/cli 6.0.3 It started to appear after @angular/cli 1.6.8 on Windows 10

On Mac it works great

genna avatar May 21 '18 09:05 genna

Please note, I get this problem on my PC, but not on my Macbook. A colleague has also seen this problem on a PC laptop. So it seems Windows specific,

robport avatar May 22 '18 11:05 robport

having it on mac too now

AwsmOli avatar May 28 '18 09:05 AwsmOli

Same issue. This is not first time when you get information about problem and it meet's with zero reaction from your side.

cp-michal avatar Jun 05 '18 08:06 cp-michal

Building on Windows 10 or 2012 R2.

I do see the 95% hanging issue if I have "optimization": true, "outputHashing": "all", "sourceMap": true, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": true, "buildOptimizer": true

If I change optimization to false, it doesn't hang. Can anyone point me to something that even explains what optimization does? I know buildOptimizer is used for tree shaking, but unsure what optimization does.

troygould avatar Jun 07 '18 21:06 troygould

Getting, same issue... Any work around?

ArsalRaza avatar Jun 08 '18 04:06 ArsalRaza

I have the same problem with my project. Win 10, 64 bit, I've seen this starting since 1.7.x. It is still happening with latest angular-cli (6.0.5).

HarelM avatar Jun 19 '18 22:06 HarelM

+1

GustavoAmerico avatar Jun 25 '18 17:06 GustavoAmerico

Disappointing that something that prevents cli working in production is seemingly ignored. Am I missing something?

robport avatar Jun 25 '18 18:06 robport

+1

Juliete avatar Jun 26 '18 07:06 Juliete

Our prod build runs as long as we're not using maps, so while it's not a breaking issue it is a serious qol issue. +1

jgoodrow avatar Jun 28 '18 01:06 jgoodrow