Title: TS2307: Cannot find module · Issue #10463 · microsoft/TypeScript · GitHub
Open Graph Title: TS2307: Cannot find module · Issue #10463 · microsoft/TypeScript
X Title: TS2307: Cannot find module · Issue #10463 · microsoft/TypeScript
Description: $ tsc --version Version 2.0.0 Code see https://gist.github.com/dherges/701e5965dd5708529410ee47e4b0c798 ///
Open Graph Description: $ tsc --version Version 2.0.0 Code see https://gist.github.com/dherges/701e5965dd5708529410ee47e4b0c798 ///
X Description: $ tsc --version Version 2.0.0 Code see https://gist.github.com/dherges/701e5965dd5708529410ee47e4b0c798 /// <reference path="./halfred.d.ts" /> import halfred = require('halfred...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/10463
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TS2307: Cannot find module ","articleBody":"```\n$ tsc --version\nVersion 2.0.0\n```\n\n**Code**\n\nsee https://gist.github.com/dherges/701e5965dd5708529410ee47e4b0c798\n\n``` ts\n/// \u003creference path=\"./halfred.d.ts\" />\n\nimport halfred = require('halfred');\nlet resource = halfred.parse({foo: \"bar\"});\nconsole.log(resource);\n```\n\n**Expected behavior:**\n\nCompilation should be ok, runtime should be ok.\n\n**Actual behavior:** \n\nCompilation throws error \"TS2307: Cannot find module \". Then running the generated .js (on node) works as expected. Module is resolved (through `require()`) and produces expected output.\n\nCustom typings are in place. Visual Studio Code actually recognizes the typings. However, compilation fails.\n\nUsage error? Is this a mis-understanding or a `tsc` bug?\n","author":{"url":"https://github.com/dherges","@type":"Person","name":"dherges"},"datePublished":"2016-08-21T17:40:48Z","url":"https://github.com/microsoft/TypeScript/issues/10463"}
| 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:757d9b6c-a857-232b-9d49-584efc80087e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 827E:1087D4:BBF292:FBD8D4:6B00F8C6 |
| html-safe-nonce | a0947a8bd188ad697048a52feb792ce7c48ce6b7dc2187bb69ccac0b4c374fc4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjdFOjEwODdENDpCQkYyOTI6RkJEOEQ0OjZCMDBGOEM2IiwidmlzaXRvcl9pZCI6IjQ5MTkyMzkxNDkyOTYzNTE0MzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | af0faa824780bbedd67f900b68328f19b3012cd10884e0394e90fe3cae962cfb |
| hovercard-subject-tag | issue:172331726 |
| 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/10463/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2ef6bacf2edb61c043851fc80e3d999bf95f7be32d775330500b4f3785018e2d/microsoft/TypeScript/issues/10463 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2ef6bacf2edb61c043851fc80e3d999bf95f7be32d775330500b4f3785018e2d/microsoft/TypeScript/issues/10463 |
| og:image:alt | $ tsc --version Version 2.0.0 Code see https://gist.github.com/dherges/701e5965dd5708529410ee47e4b0c798 /// |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dherges |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| 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 | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width