Angular CLI: 1.5.2
Node: 8.9.1
OS: win32 x64
Angular: 5.0.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.5.2
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.36
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.2
@schematics/angular: 0.1.5
typescript: 2.4.2
webpack: 3.8.1
After many refactor of my http call in whole my app, durning refactor I never run my app with ng s after doing this big refactor with changing too pipe() and adding return types interface to my get and post call. When I estimate I finished I just try to run my application, and now I'm encouring this incomprehensible bug :) app's relativly big (>100modules, >200component)
How can I debug this ?
ng serve or ng buildERROR in Error: Error: Debug Failure.
at typeToString (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:28777:22)
at reportRelationError (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:34714:34)
at isRelatedTo (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:34860:21)
at eachTypeRelatedToType (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:35000:35)
at isRelatedTo (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:34820:25)
at typeArgumentsRelatedTo (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:35017:35)
at structuredTypeRelatedTo (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:35181:38)
at recursiveTypeRelatedTo (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:35074:53)
at isRelatedTo (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:34847:38)
at checkTypeRelatedTo (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:34697:26)
at checkTypeAssignableTo (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:34398:20)
at checkReturnStatement (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:45449:29)
at checkSourceElement (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:46763:28)
at Object.forEach (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:1506:30)
at checkBlock (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:44563:16)
at checkSourceElement (C:\Users\eee\WebstormProjects\iii\node_modules\typescript\lib\typescript.js:46742:28)

And when ng serve is running with this error and I change/edit a file sometimes I get:
ERROR in Error [ERR_IPC_CHANNEL_CLOSED]: channel closed
at ChildProcess.target.send (internal/child_process.js:588:16)
at AngularCompilerPlugin._updateForkedTypeChecker (C:\Users\eee\WebstormProjects\iii\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:360:34)
at Promise.resolve.then (C:\Users\eee\WebstormProjects\iii\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:208:22)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
and sometimes I get toot : lot of errors after editing file : https://gist.github.com/istiti/564fd674883f6a2fcbb153851063469f
where is problem in my file ?
might be related issue:
https://github.com/angular/angular-cli/issues/8355
https://github.com/angular/angular-cli/issues/8331
https://github.com/angular/angular-cli/issues/7875
Event if lot people have error after editing file like me to get « err ipc channel closed »
I don’t undertsand why i get insignifiant error when i first run ng serve without editing file I het this « ERROR in Error: Error: Debug Failure.
at typeToString « typescript
Dont understand why cli doesnt tell me which file have ts syntax error or so? How can I debug compilation ng serve to find error . Thanks a lot
After searching durning hours, i find file which contain syntax error:

Please, can we maybe handle this error and put in console file/line because here it's by chance i found it, no typescript no cli tell me where search it.
can be closed but need solution
This also happens if you use [] e.g. to describe the type of a map:
Map<string, []> = new Map();
→ ERROR in Error: Error: Debug Failure
Angular just fails with the ERROR in Error: Error: Debug Failure. message. Changing the [] to any[] fixes the problem. Thanks @filipesilva for the hint, this is almost impossible to find!
Map<string, any[]> = new Map();
→ OK
I'm having this error too, no idea how to solve it ...
same issue with syntax error:
class MyClass(){
data: [] = [];
}
I encountered this issue while working on upgrading an old angular app to the latest versions + CLI and besides ensuring that I used the syntax for arrays/maps described above I had to eliminate any usages of require.
I replaced all statements like let x = require('./x.ts');
with
import * as x from './x.ts';
and I am no longer getting the error.
SOLVED
After searching durning hours, i find file which contain syntax error:
Please, can we maybe handle this error and put in console file/line because here it's by chance i found it, no typescript no cli tell me where search it.
can be closed but need solution
Yeah. It worked for me. Thank u so much.
But I think that the console would should say that, because it doesn't saying.
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
SOLVED
After searching durning hours, i find file which contain syntax error:
Please, can we maybe handle this error and put in console file/line because here it's by chance i found it, no typescript no cli tell me where search it.
can be closed but need solution