question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR in Error: Error: Debug Failure.

See original GitHub issue

Versions

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 or ng 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 clierror

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:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
elvisbegoviccommented, Nov 20, 2017

SOLVED

After searching durning hours, i find file which contain syntax error:

image

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

7reactions
Granjowcommented, Feb 2, 2018

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
Read more comments on GitHub >

github_iconTop Results From Across the Web

typescript, error: "Debug Failure. False Expression" at ...
1. Try upgrading TypeScript. If the problem is still there, follow the process to file a new TypeScript bug.
Read more >
TS Server fatal error: Debug Failure. False expression. #38365
Issue Type: Bug TypeScript Version: 3.8.3 Steps to reproduce crash 1. 2. 3. TS Server Error Stack Error: Debug Failure. False expression. at ......
Read more >
TypeScript Compiler fails with "Debug Failure. False ...
Open test.ts from the attached project. TypeScript Service and Compiler should be enabled. ... It would be nice to catch error and warn...
Read more >
Microsoft/TypeScript - Gitter
trying to run some tests with ts-mocha, and just getting "Code generation failed" with no further clues. any suggestions? just "Error: Debug Failure....
Read more >
JavaScript language service has issues with unicode paths
If the path to the project contains unicode characters (e.g. "İ"), the JavaScript language service gives the following error and IntelliSense stops working:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found