Title: Error: Debug Failure. False expression: File normalize.css/normalize.css has unknown extension. · Issue #13004 · microsoft/TypeScript · GitHub
Open Graph Title: Error: Debug Failure. False expression: File normalize.css/normalize.css has unknown extension. · Issue #13004 · microsoft/TypeScript
X Title: Error: Debug Failure. False expression: File normalize.css/normalize.css has unknown extension. · Issue #13004 · microsoft/TypeScript
Description: TypeScript Version: 2.1.4 and nightly (2.2.0-dev.201xxxxx) Code import 'normalize.css'; tsconfig { "compilerOptions": { "moduleResolution": "node" }, "exclude": [ "node_modules" ] } Expected behavior: Tsc should compile without error as ...
Open Graph Description: TypeScript Version: 2.1.4 and nightly (2.2.0-dev.201xxxxx) Code import 'normalize.css'; tsconfig { "compilerOptions": { "moduleResolution": "node" }, "exclude": [ "node_modules" ] } Expected behavi...
X Description: TypeScript Version: 2.1.4 and nightly (2.2.0-dev.201xxxxx) Code import 'normalize.css'; tsconfig { "compilerOptions": { "moduleResolution": "node" }, "exc...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/13004
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error: Debug Failure. False expression: File normalize.css/normalize.css has unknown extension.","articleBody":"**TypeScript Version:** 2.1.4 and nightly (2.2.0-dev.201xxxxx)\r\n\r\n**Code**\r\n```ts\r\nimport 'normalize.css';\r\n```\r\n\r\n**tsconfig**\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"moduleResolution\": \"node\"\r\n },\r\n \"exclude\": [\r\n \"node_modules\"\r\n ]\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nTsc should compile without error as ts 2.0.10 does.\r\nThis kind of import are handled by webpack that injects the css at runtime. \r\n\r\n**Actual behavior:**\r\nRunning tsc 2.1.4 fails with the following error\r\n```\r\nError: Debug Failure. False expression: File /home/sarod/dev/git/tsloader-ts2-1/node_modules/normalize.css/normalize.css has unknown extension.\r\n at Object.assert (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:1796:23)\r\n at Object.fail (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:1801:19)\r\n at Object.extensionFromPath (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:1912:15)\r\n at resolvedFromAnyFile (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:18928:44)\r\n at loadNodeModuleFromDirectory (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19382:28)\r\n at loadModuleFromNodeModulesFolder (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19411:13)\r\n at loadModuleFromNodeModulesOneLevel (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19428:53)\r\n at /home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19422:24\r\n at forEachAncestorDirectory (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19480:26)\r\n at loadModuleFromNodeModulesWorker (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19420:16)\r\n```\r\n\r\nI initially thought it was a ts-loader issue that fails with another error on the same code (see https://github.com/TypeStrong/ts-loader/issues/416)\r\n\r\nThis public repro can be used to reproduce https://github.com/sarod/ts-loader-issue416\r\n","author":{"url":"https://github.com/sarod","@type":"Person","name":"sarod"},"datePublished":"2016-12-17T21:42:42Z","url":"https://github.com/microsoft/TypeScript/issues/13004"}
| 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:5cd6f0e8-8eac-f26b-1a64-d75cf38ad199 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F1A:2E7EBB:3749F9:4759D3:6B00D180 |
| html-safe-nonce | 485a0adfc5d6525a4e51bfdc0472cc7f31445b755a86802f7ed67cd2589ee445 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjFBOjJFN0VCQjozNzQ5Rjk6NDc1OUQzOjZCMDBEMTgwIiwidmlzaXRvcl9pZCI6IjUzMzM3Mjk5MjAyOTQxMTM2NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 411dc3b901dc606e9e193ccaf9bf42a9152880c66cc07bf2b7f6baf179beeb95 |
| hovercard-subject-tag | issue:196244503 |
| 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/13004/issue_layout |
| twitter:image | https://opengraph.githubassets.com/76873ffcbd34418b1cdc76a22ee456329a3955b19759b29945ae3141c4c99373/microsoft/TypeScript/issues/13004 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76873ffcbd34418b1cdc76a22ee456329a3955b19759b29945ae3141c4c99373/microsoft/TypeScript/issues/13004 |
| og:image:alt | TypeScript Version: 2.1.4 and nightly (2.2.0-dev.201xxxxx) Code import 'normalize.css'; tsconfig { "compilerOptions": { "moduleResolution": "node" }, "exclude": [ "node_modules" ] } Expected behavi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sarod |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5 |
| 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 | 4943239a6d2c591325dad6e5c313e1cafda877f6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width