Title: Compiler crash with `RangeError: Map maximum size exceeded` · Issue #55630 · microsoft/TypeScript · GitHub
Open Graph Title: Compiler crash with `RangeError: Map maximum size exceeded` · Issue #55630 · microsoft/TypeScript
X Title: Compiler crash with `RangeError: Map maximum size exceeded` · Issue #55630 · microsoft/TypeScript
Description: 🔎 Search Terms RangeError: Map maximum size exceeded RangeError: Value undefined out of range for undefined options property undefined (node 16) react types antd types fontawesome types 🕗 Version & Regression Information This is a crash ...
Open Graph Description: 🔎 Search Terms RangeError: Map maximum size exceeded RangeError: Value undefined out of range for undefined options property undefined (node 16) react types antd types fontawesome types 🕗 Version &...
X Description: 🔎 Search Terms RangeError: Map maximum size exceeded RangeError: Value undefined out of range for undefined options property undefined (node 16) react types antd types fontawesome types 🕗 Version &...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/55630
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Compiler crash with `RangeError: Map maximum size exceeded`","articleBody":"### 🔎 Search Terms\r\n\r\nRangeError: Map maximum size exceeded\r\nRangeError: Value undefined out of range for undefined options property undefined (node 16)\r\nreact types\r\nantd types\r\nfontawesome types\r\n\r\n\r\n### 🕗 Version & Regression Information\r\n\r\n- This is a crash\r\n- I've tested this with the latest nightly (5.3.0-dev.20230904), 5.2.2 and 5.1.6\r\n- I was unable to test this on prior versions because I've converted my code to ts and it started to occur\r\n\r\n\r\n### ⏯ Playground Link\r\n\r\n_No response_\r\n\r\n### 💻 Code\r\n\r\nSimple file:\r\n```tsx\r\nimport React from 'react';\r\nimport {Menu} from 'antd';\r\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\r\n\r\ntype IconProp = React.ComponentProps\u003ctypeof FontAwesomeIcon>['icon'];\r\n\r\ntype Props =\r\n & React.PropsWithChildren\u003c{ icon: IconProp }>\r\n & React.ComponentProps\u003ctypeof Menu.Item>\r\n\r\nexport const Item = ({icon}: Props) => {\r\n return \u003cFontAwesomeIcon icon={icon}/>;\r\n};\r\n```\r\n\r\npackage.json\r\n```json\r\n{\r\n \"name\": \"ts-compiler-crash\",\r\n \"version\": \"1.0.0\",\r\n \"main\": \"index.js\",\r\n \"license\": \"MIT\",\r\n \"dependencies\": {\r\n \"@fortawesome/fontawesome-svg-core\": \"^6.4.2\",\r\n \"@fortawesome/react-fontawesome\": \"^0.2.0\",\r\n \"@types/react\": \"^18.2.21\",\r\n \"typescript\": \"^5.2.2\",\r\n \"antd\": \"~4.2.0\"\r\n }\r\n}\r\n```\r\n\r\ntsconfig.json\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"declaration\": false,\r\n \"emitDecoratorMetadata\": true,\r\n \"experimentalDecorators\": true,\r\n \"lib\": [\"es2019\", \"es6\", \"dom\"],\r\n \"module\": \"es6\",\r\n \"moduleResolution\": \"node\",\r\n \"sourceMap\": true,\r\n \"target\": \"es6\",\r\n \"jsx\": \"react\",\r\n \"noEmit\": true,\r\n \"skipLibCheck\": true,\r\n \"allowSyntheticDefaultImports\": true,\r\n \"allowJs\": true,\r\n \"strict\": true,\r\n \"noImplicitAny\": true,\r\n \"strictNullChecks\": true,\r\n \"noFallthroughCasesInSwitch\": true\r\n }\r\n}\r\n```\r\n\r\n\r\n### 🙁 Actual behavior\r\n\r\nCompiler crashes with\r\n\r\n```\r\nyarn tsc\r\nyarn run v1.22.19\r\n$ /Users/gabrielrohden/Desktop/Projects/Personal/ts-compiler-crash/node_modules/.bin/tsc\r\n/Users/gabrielrohden/Desktop/Projects/Personal/ts-compiler-crash/node_modules/typescript/lib/tsc.js:116479\r\n throw e;\r\n ^\r\n\r\nRangeError: Map maximum size exceeded\r\n at Map.set (\u003canonymous>)\r\n at recursiveTypeRelatedTo (/Users/gabrielrohden/Desktop/Projects/Personal/ts-compiler-crash/node_modules/typescript/lib/tsc.js:60782:18)\r\n at isRelatedTo (/Users/gabrielrohden/Desktop/Projects/Personal/ts-compiler-crash/node_modules/typescript/lib/tsc.js:60199:122)\r\n at typeRelatedToSomeType (/Users/gabrielrohden/Desktop/Projects/Personal/ts-compiler-crash/node_modules/typescript/lib/tsc.js:60460:25)\r\n at unionOrIntersectionRelatedTo (/Users/gabrielrohden/Desktop/Projects/Personal/ts-compiler-crash/node_modules/typescript/lib/tsc.js:60380:16)\r\n at structuredTypeRelatedToWorker (/Users/gabrielrohden/Desktop/Projects/Personal/ts-compiler-crash/node_modules/typescript/lib/tsc.js:60959:23)\r\n at structuredTypeRelatedTo (/Users/gabrielrohden/Desktop/Projects/Personal/ts-compiler-crash/node_modules/typescript/lib/tsc.js:60801:21)\r\n at recursiveTypeRelatedTo (/Users/gabrielrohden/Desktop/Projects/Personal/ts-compiler-crash/node_modules/typescript/lib/tsc.js:60754:19)\r\n at isRelatedTo (/Users/gabrielrohden/Desktop/Projects/Personal/ts-compiler-crash/node_modules/typescript/lib/tsc.js:60199:122)\r\n at eachTypeRelatedToType (/Users/gabrielrohden/Desktop/Projects/Personal/ts-compiler-crash/node_modules/typescript/lib/tsc.js:60555:25)\r\n\r\nNode.js v18.17.1\r\nerror Command failed with exit code 1.\r\n```\r\n\r\n### 🙂 Expected behavior\r\n\r\nThe compiler to at least not crash :/\r\n\r\n### Additional information about the issue\r\n\r\nThere's a related issue https://github.com/microsoft/TypeScript/issues/50290\r\n\r\nBut its closed, so I'm opening a new one since that one wasn't really [fixed but workarounded](https://github.com/microsoft/TypeScript/issues/50290#issuecomment-1228824018)","author":{"url":"https://github.com/Grohden","@type":"Person","name":"Grohden"},"datePublished":"2023-09-04T20:24:21Z","url":"https://github.com/microsoft/TypeScript/issues/55630"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:aa57bc9f-d8ef-57c4-6521-279acc7fd48d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83B8:16AB79:2B8FA4A:3767080:6B01B119 |
| html-safe-nonce | 156a5a08f064adf3824265e4ad8f3b086d1feaf652efa3b78acddd8eced5aa9b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0I4OjE2QUI3OToyQjhGQTRBOjM3NjcwODA6NkIwMUIxMTkiLCJ2aXNpdG9yX2lkIjoiOTg2NDgxOTkzMTQ5NjkwMTM3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 440a7e23e5d4e2ab6d333ff10e905ec55fc0938a69642163f06f785d6027bef5 |
| hovercard-subject-tag | issue:1880828801 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/55630/issue_layout |
| twitter:image | https://opengraph.githubassets.com/25b74a807b9a5c1998405991c9dcca5e14c3dacc69cefb8783586680fdaf1628/microsoft/TypeScript/issues/55630 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/25b74a807b9a5c1998405991c9dcca5e14c3dacc69cefb8783586680fdaf1628/microsoft/TypeScript/issues/55630 |
| og:image:alt | 🔎 Search Terms RangeError: Map maximum size exceeded RangeError: Value undefined out of range for undefined options property undefined (node 16) react types antd types fontawesome types 🕗 Version &... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Grohden |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width