-
Notifications
You must be signed in to change notification settings - Fork 12.8k
TypeError: Cannot read property '239' of undefined #18712
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
Hmm. Just found this issue which could be useful: #17982 |
This helped! I had the debugger stop on uncaught exception and found that the error was defining a type with the same name as an import.
It would be nice if this was reported to the user. |
@ccorcos can you share a simple repro with the issue? |
Hmm. I spent a solid 30 minutes this morning and I'm unable to come up with something minimal :/ In my circumstance, it had to do with an import and an interface having a name collision. There was a lot of JSX in that file and the name collision was for a component. But I'm unable to reproduce it in a minimal example... I guess we'll just hope someone else runs into this and finds this issue. |
@ccorcos Don't worry my man, I have a repro for you: // @filename: b.ts
export const zzz = 123;
export default zzz;
// @filename: a.ts
export interface zzz {
x: string;
}
import zzz from "./b";
const x: zzz = { x: "" };
zzz;
export default zzz;
// @filename: index.ts
import zzz from "./a";
const x: zzz = { x: "" };
zzz;
import originalZZZ from "./b";
originalZZZ;
const y: originalZZZ = x; And a fix forthcoming. |
TypeScript Version: 2.5.2 / nightly (2.5.0-dev.201xxxxx)
Code
I'm upgrading my 2.3 project to 2.5 and I'm getting this really cryptic error:
Expected behavior:
I would expect an error that tells me something about how I can fix this...
Actual behavior:
The text was updated successfully, but these errors were encountered: