-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Cannot read property 'flags' of undefined #19142
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
Comments
what version are you seeing this on? have you tried on |
I wish I knew!! I promise I would provide more if I knew more. I'll try
"@next" tomorrow, no sweat. Is there a way to get to compiler to print out
more information about the code it's working on? This could be way after
tokenizing and syntax checking so I don't know. I have been seeing this
for months, it happens only using HRM (already set timeout to 2 seconds so
it's not an file-system race condition). I feel like something changed in
my code style-wise and it started appearing. Missing @component{
styleUrls: [] } maybe?
…On Thu, Oct 12, 2017 at 5:23 PM, Mohamed Hegazy ***@***.***> wrote:
what version are you seeing this on? have you tried on ***@***.***?
what is the source code that is causing this issue to happen?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#19142 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AX5Xbob0PNbEhm5ZODo5jIbUomh6P1wQks5srq1vgaJpZM4P3qob>
.
--
CONFIDENTIALITY NOTICE: The contents of this email message and any
attachments are intended solely for the addressee(s) and may contain
confidential and/or privileged information and may be legally protected
from disclosure. It is then shared with tech companies, bots, hackers,
government agencies, and marketers. The security of this message is none,
and it may be shared on Instagram at anytime. If you are OK with this,
please respond. There isn't really any security or privacy anywhere. If
you disagree you may want to go camping and talk to people face-to-face
like in old times.
|
We would be happy to sign any required NDA to get access to the code. you can also email me directly a sample that reproduces the issue on my github username @microsoft.com. |
You can email me the zip file. |
You can also launch the compiler under node inspector, assuming you have node v7 or later node --inspect --debug-brk node_modules\typescript\lib\tsc.js --p <path to your tsconfig.json> in your chrome go to |
Hmm, I am not sure how to do that from within the angular-cli serve
command, but --inspect is definitely an interesting flag.
…On Mon, Oct 16, 2017 at 9:14 AM, Mohamed Hegazy ***@***.***> wrote:
You can also launch the compiler under node inspector, assuming you have
node v7 or later
node --inspect --debug-brk node_modules\typescript\lib\tsc.js --p <path to your tsconfig.json>
in your chrome go to chrome://inspect. let the process run, when it
breaks, there should be getSemanticDiagnosticsForFileNoCache on the
stack. Look up the value of sourceFile.fileName in your watch window,
this should tell you which file is causing the issue. you can also dump the
diagnostic object that is the argument of the function.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#19142 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AX5Xbjv9j22GCSvGtb4nwrrejxnZXHWZks5ss4D7gaJpZM4P3qob>
.
--
CONFIDENTIALITY NOTICE: The contents of this email message and any
attachments are intended solely for the addressee(s) and may contain
confidential and/or privileged information and may be legally protected
from disclosure. It is then shared with tech companies, bots, hackers,
government agencies, and marketers. The security of this message is none,
and it may be shared on Instagram at anytime. If you are OK with this,
please respond. There isn't really any security or privacy anywhere. If
you disagree you may want to go camping and talk to people face-to-face
like in old times.
|
Any ideas @filipesilva ? |
@megamindbrian this looks like a bug with one of the transforms we use in Angular CLI. Impossible to tell what's happening just from the log though. Can you open an issue on https://github.com/angular/angular-cli and include a reproduction of what I can do to see the error myself? Meanwhile if you want to inspect the error you can use the following command: |
Perfect, thank you! This is gold. I didn't even know this was possible. |
Awesome, that's definitely not intended. Please include that reproduction in the CLI issue, together with the other details. Angular and TS versions are especially important because we use different pipeline depending on those. |
@megamindbrian running |
(You can keep adding |
@RyanCavanaugh Yeah, I dropped down to getDiagnostics(), and it was just the same file that I edited erroneously. Maybe watch doesn't recover on Injectables because there is no configuration options? Injectable() takes 0 arguments? I am trying typescript@next now. I haven't updated Angular 4 in a while (~ a least a month). |
Confirmed this Module build failed: TypeError: Cannot read property 'flags' of undefined |
can you get us a small sample that makes it crash? |
I was on my way to doing just that, but setting up a new project the error
goes away. Line numbers with the invalid line work just fine. This is
using typescript@next with angular 4.4.0. Trying to upgrade my current
project to angular 4.4 to see if it still happens.
…On Mon, Oct 16, 2017 at 11:33 AM, Mohamed Hegazy ***@***.***> wrote:
can you get us a small sample that makes it crash?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19142 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AX5XbqSeGe0t71a4-2cjUjCgm0dLo0Tjks5ss6FfgaJpZM4P3qob>
.
--
CONFIDENTIALITY NOTICE: The contents of this email message and any
attachments are intended solely for the addressee(s) and may contain
confidential and/or privileged information and may be legally protected
from disclosure. It is then shared with tech companies, bots, hackers,
government agencies, and marketers. The security of this message is none,
and it may be shared on Instagram at anytime. If you are OK with this,
please respond. There isn't really any security or privacy anywhere. If
you disagree you may want to go camping and talk to people face-to-face
like in old times.
|
Been debugging the entire code base with no errors using Typescript
"^>=2.1.0 <2.4.0" and Angular 4.4.5 no "flags" error.
On Mon, Oct 16, 2017 at 11:46 AM, Brian Cullinan <megamindbrian@gmail.com>
wrote:
… I was on my way to doing just that, but setting up a new project the error
goes away. Line numbers with the invalid line work just fine. This is
using ***@***.*** with angular 4.4.0. Trying to upgrade my current
project to angular 4.4 to see if it still happens.
On Mon, Oct 16, 2017 at 11:33 AM, Mohamed Hegazy ***@***.***
> wrote:
> can you get us a small sample that makes it crash?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#19142 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AX5XbqSeGe0t71a4-2cjUjCgm0dLo0Tjks5ss6FfgaJpZM4P3qob>
> .
>
--
CONFIDENTIALITY NOTICE: The contents of this email message and any
attachments are intended solely for the addressee(s) and may contain
confidential and/or privileged information and may be legally protected
from disclosure. It is then shared with tech companies, bots, hackers,
government agencies, and marketers. The security of this message is none,
and it may be shared on Instagram at anytime. If you are OK with this,
please respond. There isn't really any security or privacy anywhere. If
you disagree you may want to go camping and talk to people face-to-face
like in old times.
--
CONFIDENTIALITY NOTICE: The contents of this email message and any
attachments are intended solely for the addressee(s) and may contain
confidential and/or privileged information and may be legally protected
from disclosure. It is then shared with tech companies, bots, hackers,
government agencies, and marketers. The security of this message is none,
and it may be shared on Instagram at anytime. If you are OK with this,
please respond. There isn't really any security or privacy anywhere. If
you disagree you may want to go camping and talk to people face-to-face
like in old times.
|
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
As megamindbrian's last comment suggests, switching TypeScript versions may be enough to fix the issue. I had it with TS 2.4. It went away after switching to TS 2.6. |
Been dealing with this for months, please fix.
The text was updated successfully, but these errors were encountered: