Title: NPM Install fails when tsconfig is present in VSCode workspace · Issue #16955 · microsoft/TypeScript · GitHub
Open Graph Title: NPM Install fails when tsconfig is present in VSCode workspace · Issue #16955 · microsoft/TypeScript
X Title: NPM Install fails when tsconfig is present in VSCode workspace · Issue #16955 · microsoft/TypeScript
Description: TypeScript Version: 2.3.4 NPM version: 5.0.4 Repo In vscode, create a workspace: app.ts: import _ from 'lodash' tsconfig.json { "compilerOptions": { } } package.json: { "name": "test", "version": "1.0.0", "description": "", "main": "inde...
Open Graph Description: TypeScript Version: 2.3.4 NPM version: 5.0.4 Repo In vscode, create a workspace: app.ts: import _ from 'lodash' tsconfig.json { "compilerOptions": { } } package.json: { "name": "test", "version": "...
X Description: TypeScript Version: 2.3.4 NPM version: 5.0.4 Repo In vscode, create a workspace: app.ts: import _ from 'lodash' tsconfig.json { "compilerOptions": { } } package.json: { "name...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/16955
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NPM Install fails when tsconfig is present in VSCode workspace","articleBody":"**TypeScript Version:** 2.3.4 \r\n**NPM version:** 5.0.4\r\n\r\n**Repo**\r\n1. In vscode, create a workspace:\r\n\r\n`app.ts`:\r\n\r\n```ts\r\nimport _ from 'lodash'\r\n```\r\n\r\n`tsconfig.json`\r\n\r\n```\r\n{\r\n \"compilerOptions\": { }\r\n}\r\n```\r\n\r\n`package.json`:\r\n```ts\r\n{\r\n \"name\": \"test\",\r\n \"version\": \"1.0.0\",\r\n \"description\": \"\",\r\n \"main\": \"index.js\",\r\n \"dependencies\": {\r\n \"lodash\": \"^4.16.4\",\r\n \"rxjs\": \"^5.4.2\"\r\n },\r\n \"devDependencies\": {\r\n \"@types/lodash\": \"^4.14.68\",\r\n \"typescript\": \"^2.4.1\"\r\n },\r\n \"scripts\": {\r\n \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\r\n },\r\n \"keywords\": [],\r\n \"author\": \"\",\r\n \"license\": \"ISC\"\r\n}\r\n```\r\n\r\n2. With code open, open the ts file.\r\n\r\n3. In the a terminal for the current workspace, run `npm install`\r\n\r\n\r\n**Bug**\r\n\r\n```\r\nPS C:\\source\\test> npm i\r\nnpm WARN test@1.0.0 No description\r\nnpm WARN test@1.0.0 No repository field.\r\n\r\nnpm ERR! path C:\\source\\test\\node_modules\\@types\\lodash\r\nnpm ERR! code ENOENT\r\nnpm ERR! errno -4058\r\nnpm ERR! syscall rename\r\nnpm ERR! enoent ENOENT: no such file or directory, rename 'C:\\source\\test\\node_modules\\@types\\lodash' -> 'C:\\source\\test\\node_modules\\@types\\.lodash.DELETE'\r\nnpm ERR! enoent This is related to npm not being able to find a file.\r\nnpm ERR! enoent\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR! C:\\Users\\matb.REDMOND\\AppData\\Roaming\\npm-cache\\_logs\\2017-07-05T20_55_16_461Z-debug.log\r\n```\r\n\r\nHere are the file handles:\r\n\r\n```\r\n> C:\\Users\\matb.REDMOND\\Downloads\\Handle\\handle.exe lodash\r\nCode.exe pid: 21136 type: File 534: C:\\source\\test\\node_modules\\.staging\\@types\\lodash-4e92de43\\tem plate\r\nCode.exe pid: 21136 type: File 5E0: C:\\source\\test\\node_modules\\.staging\\@types\\lodash-4e92de43\r\n````\r\n\r\n\r\nand the process info for pid `21136`:\r\n\r\n```\r\n\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"c:\\Program Files (x86)\\Microsoft VS Code\\resources\\app\\extensions\\typescript\\out\\utils\\electronForkStart\" \"c:\\Program Files (x86)\\Microsoft VS Code\\resources\\app\\extensions\\node_modules\\typescript\\lib\\tsserver.js\" --useSingleInferredProject --enableTelemetry --cancellationPipeName \\\\.\\pipe\\vscode-tscancellation-70cad40d58dfe783e0f8-sock*\r\n```\r\n\r\nSeems that the tsserver is holding onto these files, breaking npm install","author":{"url":"https://github.com/mjbvz","@type":"Person","name":"mjbvz"},"datePublished":"2017-07-05T21:21:31Z","url":"https://github.com/microsoft/TypeScript/issues/16955"}
| 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:24ce58ba-46bd-8d03-99a1-96817d5f339b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C77A:A7C8F:C88DA7:1028139:6B00EDC2 |
| html-safe-nonce | f1d349efd4df3cc91466d4779ceecc541bc5a20400baa7f48bcb35f3de75f9ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzdBOkE3QzhGOkM4OERBNzoxMDI4MTM5OjZCMDBFREMyIiwidmlzaXRvcl9pZCI6IjMzMzAyNjI5OTgyNDQ3MTU5NzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f69e3bca2567474514f93c6484d4df2464cfab5dd4f8029ba628eacb9dade762 |
| hovercard-subject-tag | issue:240779811 |
| 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/16955/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2e88cf12bb99ca2d322c3a54b218be5103b925777e819127e3b66fc97d94952e/microsoft/TypeScript/issues/16955 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2e88cf12bb99ca2d322c3a54b218be5103b925777e819127e3b66fc97d94952e/microsoft/TypeScript/issues/16955 |
| og:image:alt | TypeScript Version: 2.3.4 NPM version: 5.0.4 Repo In vscode, create a workspace: app.ts: import _ from 'lodash' tsconfig.json { "compilerOptions": { } } package.json: { "name": "test", "version": "... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mjbvz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width