Title: Could not find file /react/package.json · Issue #4445 · microsoft/TypeScript · GitHub
Open Graph Title: Could not find file /react/package.json · Issue #4445 · microsoft/TypeScript
X Title: Could not find file /react/package.json · Issue #4445 · microsoft/TypeScript
Description: I am using typescript@next with webpack and ts-loader. When running Webpack I am receiving the following error from typescript.js:43445 C:\Users\Michael\Development\Replicate>webpack Using config file at C:\Users\Michael\Development\Repl...
Open Graph Description: I am using typescript@next with webpack and ts-loader. When running Webpack I am receiving the following error from typescript.js:43445 C:\Users\Michael\Development\Replicate>webpack Using config f...
X Description: I am using typescript@next with webpack and ts-loader. When running Webpack I am receiving the following error from typescript.js:43445 C:\Users\Michael\Development\Replicate>webpack Using confi...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/4445
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Could not find file /react/package.json","articleBody":"I am using typescript@next with webpack and ts-loader.\n\nWhen running Webpack I am receiving the following error from typescript.js:43445\n\n```\nC:\\Users\\Michael\\Development\\Replicate>webpack\nUsing config file at C:\\Users\\Michael\\Development\\Replicate\\tsconfig.json\nC:\\Users\\Michael\\Development\\Replicate\\node_modules\\typescript\\lib\\typescript.js:43445\n throw new Error(\"Could not find file: '\" + fileName + \"'.\");\n ^\nError: Could not find file: 'C:/Users/Michael/Development/Replicate/node_modules/react/package.json'.\n at getValidSourceFile (C:\\Users\\Michael\\Development\\Replicate\\node_modules\\typescript\\lib\\typescript.js:43445:23)\n at Object.getSyntacticDiagnostics (C:\\Users\\Michael\\Development\\Replicate\\node_modules\\typescript\\lib\\typescript.js:43615:52)\n at C:\\Users\\Michael\\Development\\Replicate\\node_modules\\ts-loader\\index.js:186:42\n at Array.forEach (native)\n at Compiler.\u003canonymous> (C:\\Users\\Michael\\Development\\Replicate\\node_modules\\ts-loader\\index.js:185:14)\n at Compiler.applyPlugins (C:\\Users\\Michael\\AppData\\Roaming\\npm\\node_modules\\webpack\\node_modules\\tapable\\lib\\Tapable.js:26:37)\n at Compiler.\u003canonymous> (C:\\Users\\Michael\\AppData\\Roaming\\npm\\node_modules\\webpack\\lib\\Compiler.js:193:12)\n at Compiler.emitRecords (C:\\Users\\Michael\\AppData\\Roaming\\npm\\node_modules\\webpack\\lib\\Compiler.js:282:37)\n at Compiler.\u003canonymous> (C:\\Users\\Michael\\AppData\\Roaming\\npm\\node_modules\\webpack\\lib\\Compiler.js:187:11)\n at C:\\Users\\Michael\\AppData\\Roaming\\npm\\node_modules\\webpack\\lib\\Compiler.js:275:11\n at Compiler.applyPluginsAsync (C:\\Users\\Michael\\AppData\\Roaming\\npm\\node_modules\\webpack\\node_modules\\tapable\\lib\\Tapable.js:60:69)\n at Compiler.afterEmit (C:\\Users\\Michael\\AppData\\Roaming\\npm\\node_modules\\webpack\\lib\\Compiler.js:272:8)\n at Compiler.\u003canonymous> (C:\\Users\\Michael\\AppData\\Roaming\\npm\\node_modules\\webpack\\lib\\Compiler.js:267:14)\n at C:\\Users\\Michael\\AppData\\Roaming\\npm\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:52:16\n at done (C:\\Users\\Michael\\AppData\\Roaming\\npm\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:248:21)\n at C:\\Users\\Michael\\AppData\\Roaming\\npm\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:44:16\n at FSReqWrap.oncomplete (fs.js:95:15)\n```\n\nmy package.json\n\n```\n{\n \"name\": \"Replicate\",\n \"version\": \"1.0.0\",\n \"description\": \"Reproducing typescript file not found bug\",\n \"main\": \"webpack.config.js\",\n \"scripts\": {\n \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n },\n \"author\": \"Michael Ross\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"react\": \"^0.13.3\",\n \"ts-loader\": \"^0.5.0\",\n \"typescript\": \"^1.6.0-dev.20150825\"\n }\n}\n```\n\nmy webpack.config.js\n\n```\nmodule.exports = {\n entry: \"./app.tsx\",\n output: {\n filename: \"bundle.js\"\n },\n resolve: {\n extensions: [\"\", \".tsx\", \".ts\", \".js\"]\n },\n module: {\n loaders: [\n { test: /\\.ts(x?)$/, loader: \"ts-loader\" }\n ]\n }\n}\n```\n\nmy app.tsx\n\n```\nimport React = require('react');\n\nclass Demo extends React.Component\u003cany, any> {\n render() {\n return \u003cdiv>Trying to replicate\u003c/div>\n }\n}\n\nReact.render(\u003cDemo />, document.getElementById(\"demo\"));\n```\n\nand just in case, my tsconfig.json\n\n```\n{\n \"compilerOptions\": {\n \"target\": \"es5\",\n \"module\": \"commonjs\",\n \"jsx\": \"react\",\n \"sourceMap\": true\n },\n \"files\": [\n \"./typings/tsd.d.ts\",\n \"./app.tsx\"\n ]\n}\n```\n\nand tsd.json\n\n```\n{\n \"version\": \"v4\",\n \"repo\": \"borisyankov/DefinitelyTyped\",\n \"ref\": \"master\",\n \"path\": \"typings\",\n \"bundle\": \"typings/tsd.d.ts\",\n \"installed\": {\n \"react/react.d.ts\": {\n \"commit\": \"71a7d5306ae4f9893aafd2d85d38aac8789ebf33\"\n }\n }\n}\n```\n\nIf I have a configuration error, help and guidance is much appreciated. Thanks!\n","author":{"url":"https://github.com/madmikeross","@type":"Person","name":"madmikeross"},"datePublished":"2015-08-25T18:40:09Z","url":"https://github.com/microsoft/TypeScript/issues/4445"}
| 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:e46ece11-accb-8f0a-a881-13cf67347452 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4A6:65478:147E110:1B36A71:6B012A53 |
| html-safe-nonce | f5fc5bcca780e7bfbabbab5cdf5f5c0411223f8c047328fc6cb91d287808c028 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEE2OjY1NDc4OjE0N0UxMTA6MUIzNkE3MTo2QjAxMkE1MyIsInZpc2l0b3JfaWQiOiI5MTI2MzU3ODExMjg5MjA1MzMyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 28664f124114d0229c02fb64150c63a8b4e1463a0862c35c5c0b4be18f245a6f |
| hovercard-subject-tag | issue:103089920 |
| 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/4445/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2724ab0438999777c8655b90361db66b1950669030c7a4def389a53fed0f00f6/microsoft/TypeScript/issues/4445 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2724ab0438999777c8655b90361db66b1950669030c7a4def389a53fed0f00f6/microsoft/TypeScript/issues/4445 |
| og:image:alt | I am using typescript@next with webpack and ts-loader. When running Webpack I am receiving the following error from typescript.js:43445 C:\Users\Michael\Development\Replicate>webpack Using config f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | madmikeross |
| 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