{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28810","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28810/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28810/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28810/events","html_url":"https://github.com/Microsoft/TypeScript/issues/28810","id":386617214,"node_id":"MDU6SXNzdWUzODY2MTcyMTQ=","number":28810,"title":"TS 3.2.1 TypeError: Cannot read property 'kind' of undefined","user":{"login":"rhys-vdw","id":822105,"node_id":"MDQ6VXNlcjgyMjEwNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/822105?v=4","gravatar_id":"","url":"https://api.github.com/users/rhys-vdw","html_url":"https://github.com/rhys-vdw","followers_url":"https://api.github.com/users/rhys-vdw/followers","following_url":"https://api.github.com/users/rhys-vdw/following{/other_user}","gists_url":"https://api.github.com/users/rhys-vdw/gists{/gist_id}","starred_url":"https://api.github.com/users/rhys-vdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhys-vdw/subscriptions","organizations_url":"https://api.github.com/users/rhys-vdw/orgs","repos_url":"https://api.github.com/users/rhys-vdw/repos","events_url":"https://api.github.com/users/rhys-vdw/events{/privacy}","received_events_url":"https://api.github.com/users/rhys-vdw/received_events","type":"User","site_admin":false},"labels":[{"id":172956911,"node_id":"MDU6TGFiZWwxNzI5NTY5MTE=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/API","name":"API","color":"bfe5bf","default":false},{"id":113970366,"node_id":"MDU6TGFiZWwxMTM5NzAzNjY=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Bug","name":"Bug","color":"e11d21","default":false},{"id":1064051041,"node_id":"MDU6TGFiZWwxMDY0MDUxMDQx","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Crash","name":"Crash","color":"d93f0b","default":false},{"id":611777722,"node_id":"MDU6TGFiZWw2MTE3Nzc3MjI=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Needs%20Investigation","name":"Needs Investigation","color":"DDDDDD","default":false},{"id":113971304,"node_id":"MDU6TGFiZWwxMTM5NzEzMDQ=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Needs%20More%20Info","name":"Needs More Info","color":"556b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2018-12-03T00:10:19Z","updated_at":"2018-12-20T01:05:46Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  3.3.0-dev.20181201\r\n\r\n<!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\n\r\n - \"TypeError: Cannot read property 'kind' of undefined\"\r\n- \"Object.isBinaryExpression\"\r\n- \"getTypeReferenceTypeWorker\"\r\n\r\n**Code**\r\n\r\nSorry, I need help finding which part of my code is triggering this error. We have a very large code base, and the error does not tell me which file/line/expression is being compiled. Happy to provide more information with assistance.\r\n\r\n**Expected behavior:**\r\n\r\nBuilding through awesome-typescript-loader. Expect compilation and type check to complete without exceptions being thrown.\r\n\r\n**Actual behavior:**\r\n\r\nLogs these two error messages (with two different traces).\r\n\r\nSometimes the type check completes and I get all my errors (there are many after the upgrading to 3.2.1). Other times the compile errors are never logged.\r\n\r\nOn 3.2.1:\r\n\r\n- Sometimes logs just \"error 1\" during compilation and type checks succeeds.\r\n- Other times logs both \"error 1\" and \"error 2\"  during compilation and \"error 1\" during type check, causing it to fail.\r\n\r\nOn  3.3.0-dev.20181201:\r\n\r\nOnly did this once because the build is taking a few minutes on this version (is that normal?).\r\n\r\n- Logged \"error 1\" and \"error 2\" during compilation, and \"error 1\" during type check, causing it to fail.\r\n\r\nError 1:\r\n```\r\nTypeError: Cannot read property 'kind' of undefined\r\n    at Object.isBinaryExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:13389:21)\r\n    at getTypeReferenceTypeWorker (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:38553:51)\r\n    at getTypeReferenceType (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:38492:24)\r\n    at getTypeFromTypeReference (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:38671:28)\r\n    at getTypeFromTypeNode (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:40178:28)\r\n    at tryGetTypeFromEffectiveTypeNode (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35562:24)\r\n    at getTypeForVariableLikeDeclaration (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35192:32)\r\n    at getWidenedTypeForVariableLikeDeclaration (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35531:56)\r\n    at getTypeOfVariableOrParameterOrPropertyWorker (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35645:24)\r\n    at getTypeOfVariableOrParameterOrProperty (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35567:48)\r\n    at getTypeOfSymbol (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35856:24)\r\n    at checkPropertyAccessExpressionOrQualifiedName (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:48170:53)\r\n    at checkPropertyAccessExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:48122:20)\r\n    at checkExpressionWorker (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51802:28)\r\n    at checkExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51745:42)\r\n    at checkTruthinessExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:54156:24)\r\n    at checkBinaryLikeExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51208:28)\r\n    at checkBinaryExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51199:20)\r\n    at checkExpressionWorker (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51841:28)\r\n    at checkExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51745:42)\r\n    at checkParenthesizedExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51768:20)\r\n    at checkExpressionWorker (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51815:28)\r\n```\r\n\r\nError 2:\r\n```\r\nTypeError: Cannot read property 'kind' of undefined\r\n    at Object.isBinaryExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:13389:21)\r\n    at getTypeReferenceTypeWorker (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:38576:51)\r\n    at getTypeReferenceType (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:38515:24)\r\n    at getTypeFromTypeReference (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:38694:28)\r\n    at getTypeFromTypeNode (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:40201:28)\r\n    at tryGetTypeFromEffectiveTypeNode (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35585:24)\r\n    at getTypeForVariableLikeDeclaration (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35215:32)\r\n    at getWidenedTypeForVariableLikeDeclaration (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35554:56)\r\n    at getTypeOfVariableOrParameterOrPropertyWorker (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35668:24)\r\n    at getTypeOfVariableOrParameterOrProperty (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35590:48)\r\n    at getTypeOfSymbol (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:35879:24)\r\n    at checkPropertyAccessExpressionOrQualifiedName (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:48194:53)\r\n    at checkPropertyAccessExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:48146:20)\r\n    at checkExpressionWorker (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51826:28)\r\n    at checkExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51769:42)\r\n    at checkNonNullExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:48120:37)\r\n    at checkPropertyAccessExpressionOrQualifiedName (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:48153:28)\r\n    at checkPropertyAccessExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:48146:20)\r\n    at checkExpressionWorker (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51826:28)\r\n    at checkExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:51769:42)\r\n    at checkNonNullExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:48120:37)\r\n    at resolveCallExpression (/Users/rhys/Projects/usability-hub/usability_hub/node_modules/typescript/lib/typescript.js:49446:28)\r\n```\r\n\r\n**Related Issues:**\r\n\r\nThere are many issues with this error message but with different callstacks. Most are resolved. My understanding is that this error (\"Cannot read property 'kind' of undefined\") can arise under many circumstances so the others may not be strictly related.\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/448816663","html_url":"https://github.com/Microsoft/TypeScript/issues/28810#issuecomment-448816663","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28810","id":448816663,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODgxNjY2Mw==","user":{"login":"weswigham","id":2932786,"node_id":"MDQ6VXNlcjI5MzI3ODY=","avatar_url":"https://avatars3.githubusercontent.com/u/2932786?v=4","gravatar_id":"","url":"https://api.github.com/users/weswigham","html_url":"https://github.com/weswigham","followers_url":"https://api.github.com/users/weswigham/followers","following_url":"https://api.github.com/users/weswigham/following{/other_user}","gists_url":"https://api.github.com/users/weswigham/gists{/gist_id}","starred_url":"https://api.github.com/users/weswigham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weswigham/subscriptions","organizations_url":"https://api.github.com/users/weswigham/orgs","repos_url":"https://api.github.com/users/weswigham/repos","events_url":"https://api.github.com/users/weswigham/events{/privacy}","received_events_url":"https://api.github.com/users/weswigham/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T01:05:46Z","updated_at":"2018-12-20T01:05:46Z","author_association":"MEMBER","body":"Seems like it might be an issue with something in the shape of `@types/history`. I think it's probably caused by the merge of a class and a source file via a UMD declaration and a global. Once I get an isolated repro (so we don't regression) it should be easy to fix."}}
{"actor":{"display_login":"weswigham"}}