Skip to content

ERROR in Error: Error: Debug Failure. #8529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
elvisbegovic opened this issue Nov 17, 2017 · 9 comments
Closed

ERROR in Error: Error: Debug Failure. #8529

elvisbegovic opened this issue Nov 17, 2017 · 9 comments

Comments

@elvisbegovic
Copy link
Contributor

elvisbegovic commented Nov 17, 2017

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
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:
#8355
#8331
#7875

@elvisbegovic
Copy link
Contributor Author

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

@elvisbegovic
Copy link
Contributor Author

elvisbegovic commented 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

@filipesilva filipesilva self-assigned this Nov 24, 2017
@filipesilva filipesilva added needs: investigation Requires some digging to determine if action is needed P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful labels Nov 24, 2017
@Granjow
Copy link

Granjow commented 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

@filipesilva filipesilva added comp: cli/build and removed needs: investigation Requires some digging to determine if action is needed P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful labels Feb 14, 2018
@wlievens
Copy link

I'm having this error too, no idea how to solve it ...

@kaluginserg
Copy link

same issue with syntax error:
class MyClass(){ data: [] = []; }

@benpottle
Copy link

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.

@DeibyML
Copy link

DeibyML commented Jan 8, 2019

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

Yeah. It worked for me. Thank u so much.

But I think that the console would should say that, because it doesn't saying.

@ngbot ngbot bot added this to the needsTriage milestone Jan 24, 2019
@filipesilva
Copy link
Contributor

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.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants