ERROR in Error: Error: Debug Failure.
See original GitHub issueVersions
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
Repro steps
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
orng build
- I get:
ERROR 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)
- here gif how cli process
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 <anonymous> 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
Desired behavior
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
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:9 (3 by maintainers)
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
This also happens if you use
[]
e.g. to describe the type of a map:Angular just fails with the
ERROR in Error: Error: Debug Failure.
message. Changing the[]
toany[]
fixes the problem. Thanks @filipesilva for the hint, this is almost impossible to find!