"Channel Closed" on ng serve rebuild with v1.5.0
Bug Report or Feature Request (mark with an x)
- [X] bug report -> please search issues before submitting
- [ ] feature request
Versions.
Node: 8.9.0
OS: win32 ia32
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.5.0
@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.0
typescript: 2.4.2
webpack: 3.8.1
Repro steps.
ng new ng5-test
cd ng5-test
ng serve
Then opened in Chrome. After editing a source file two times, I get the error below.
The log given by the failure.
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry]
chunk {main} main.bundle.js (main) 20.3 kB [initial]
chunk {polyfills} polyfills.bundle.js (polyfills) 548 kB [initial]
chunk {styles} styles.bundle.js (styles) 33.5 kB [initial]
chunk {vendor} vendor.bundle.js (vendor) 7.02 MB [initial]
ERROR in Error [ERR_IPC_CHANNEL_CLOSED]: channel closed
at ChildProcess.target.send (internal/child_process.js:588:16)
at AngularCompilerPlugin._updateForkedTypeChecker (D:\Dati\node-ws\ng5-test\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:370:34)
at Promise.resolve.then (D:\Dati\node-ws\ng5-test\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:208:22)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
webpack: Failed to compile.
Desired functionality.
Mention any other details that might be useful.
Same here, after the second time I save a file.
Start command
ng serve --aot -H 0.0.0.0 --disable-host-check
Versions
Angular CLI: 1.5.0
Node: 8.1.3
OS: linux arm
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
@angular/cli: 1.5.0
@angular-devkit/core: 0.0.20
@ngtools/json-schema: 1.1.0
typescript: 2.4.2
webpack: 3.8.1
Error Message
webpack: Failed to compile.
webpack: Compiling...
Date: 2017-11-03T17:11:47.102Z
Hash: 00eb3265da52f37f4f00
Time: 3189ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry]
chunk {main} main.bundle.js (main) 520 kB [initial]
chunk {polyfills} polyfills.bundle.js (polyfills) 600 kB [initial]
chunk {styles} styles.bundle.js (styles) 811 kB [initial]
chunk {vendor} vendor.bundle.js (vendor) 15 MB [initial]
ERROR in Error [ERR_IPC_CHANNEL_CLOSED]: channel closed
at ChildProcess.target.send (internal/child_process.js:557:16)
at AngularCompilerPlugin._updateForkedTypeChecker (/workdir/p4-monitor-angular/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:370:34)
at Promise.resolve.then (/workdir/p4-monitor-angular/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:208:22)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
webpack: Failed to compile.
Also seeing this exact behavior.
Same issue here on win machine with medium large project. It works for some edits but then this error occurs. Sometimes immediately sometimes it takes some more rebuilds but it always end like this.
Same problem !!
same problem. can't able to work
Update: on the same machine, switching to a fresh new node 8.9.0 64bit installation solved the issue for me!
Unfortunately I can't update to node 64bit, but did update from 8.1.3 to 9.0.0 (ARMv7) and still have that issue.
Also, I use: https://yadi.sk/d/PISF7IxL3PX6w2
This issue happens when any changes made to the external file like interface or animation.
Same problem. I update Node a 8.9.1 - 32 bits and still have that problem.
I also have this problem,when the server rebuild ,throw error

problem solved by moving to node v9.1.
In v9.1. 32 bit. on second compile there comes no error however the server get stopped. Any solution?
My solution was to downgrade back to cli v1.4
Thanks CramericalIndustries it worked 👍
I moved my project over to my laptop that had node version 6.11.3 and I stopped getting the errors. I also tried upgrading my version to 8.9.1 and 9.1, but I didn't have any luck getting it to work.
I think https://github.com/angular/angular-cli/pull/8306 might have solved this. Can you please try 1.6.0-beta.0 and tell me if you still get it?
@filipesilva is there a guide of how to install the beta releases? I tried doing npm i @angular/[email protected]. Then after the installation I executed ng -v and got lots of exceptions that told me that package xy is missing. After I've installed package xy it told me that now package xy1 is missing and so on. Maybe I should mention that I'm on a ARMv7.
gooood it's work after do this updats :
Angular CLI: 1.6.0-beta.0
Node: 8.9.1
OS: win32 ia32
Angular: 5.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.6.0-beta.0
@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
@schematics/angular: 0.1.2
typescript: 2.4.2
webpack: 3.8.1
still getting the same error with cli 1.6.0-beta.0, Ubuntu 16.04
ERROR in Error [ERR_IPC_CHANNEL_CLOSED]: channel closed
at ChildProcess.target.send (internal/child_process.js:588:16)
at AngularCompilerPlugin._updateForkedTypeChecker (/home/sand/Storage/sand/Local/WebstormProjects/Angular/smartscale-refactor/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:360:34)
at Promise.resolve.then (/home/sand/Storage/sand/Local/WebstormProjects/Angular/smartscale-refactor/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:208:22)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
webpack: Failed to compile.
ng -v
Angular CLI: 1.6.0-beta.0
Node: 8.9.1
OS: linux x64
Angular: 5.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker
@angular/cdk: 5.0.0-rc0
@angular/cli: 1.6.0-beta.0
@angular/flex-layout: 2.0.0-beta.10-4905443
@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.9.0-beta.0
@schematics/angular: 0.1.2
typescript: 2.6.1
webpack: 3.8.1
UPDATE: this error is not occurring in node 9.2 but there is another error I think it related to this issue:
<--- Last few GCs --->
[14909:0x3907ec0] 1660022 ms: Mark-sweep 1361.7 (1456.4) -> 1361.7 (1456.9) MB, 1192.7 / 0.0 ms allocation failure GC in old space requested
[14909:0x3907ec0] 1661622 ms: Mark-sweep 1361.7 (1456.9) -> 1361.7 (1421.9) MB, 1599.5 / 0.0 ms last resort GC in old space requested
[14909:0x3907ec0] 1662580 ms: Mark-sweep 1361.7 (1421.9) -> 1361.7 (1421.9) MB, 957.9 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x3361a08a5749 <JSObject>
1: getNodeLinks(aka getNodeLinks) [/home/sand/Storage/sand/Local/WebstormProjects/Angular/smartscale-refactor/node_modules/typescript/lib/typescript.js:~24230] [pc=0x159b3f222545](this=0x368bc03822d1 <undefined>,node=0x28448a91ab21 <SourceFileObject map = 0x2bd6b88ffe51>)
2: checkSourceFileWorker(aka checkSourceFileWorker) [/home/sand/Storage/sand/Local/WebstormProjects/Angular/smartscal...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
2: 0x11e177c [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
5: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
6: v8::internal::HashTable<v8::internal::SeededNumberDictionary, v8::internal::SeededNumberDictionaryShape>::NewInternal(v8::internal::Isolate*, int, v8::internal::PretenureFlag) [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
7: v8::internal::HashTable<v8::internal::SeededNumberDictionary, v8::internal::SeededNumberDictionaryShape>::New(v8::internal::Isolate*, int, v8::internal::PretenureFlag, v8::internal::MinimumCapacity) [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
8: 0xde7508 [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
9: 0xde7752 [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
10: v8::internal::JSObject::NormalizeElements(v8::internal::Handle<v8::internal::JSObject>) [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
11: 0xde83ce [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
12: v8::internal::JSObject::AddDataElement(v8::internal::Handle<v8::internal::JSObject>, unsigned int, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::ShouldThrow) [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
13: v8::internal::Object::AddDataProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::ShouldThrow, v8::internal::Object::StoreFromKeyed) [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
14: v8::internal::Object::SetProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::LanguageMode, v8::internal::Object::StoreFromKeyed) [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
15: v8::internal::Runtime_SetProperty(int, v8::internal::Object**, v8::internal::Isolate*) [/home/sand/.nvm/versions/node/v9.2.0/bin/node]
16: 0x159b3e1842fd