-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Milestone
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": "index.js",
"dependencies": {
"lodash": "^4.16.4",
"rxjs": "^5.4.2"
},
"devDependencies": {
"@types/lodash": "^4.14.68",
"typescript": "^2.4.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
-
With code open, open the ts file.
-
In the a terminal for the current workspace, run
npm install
Bug
PS C:\source\test> npm i
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.
npm ERR! path C:\source\test\node_modules\@types\lodash
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\source\test\node_modules\@types\lodash' -> 'C:\source\test\node_modules\@types\.lodash.DELETE'
npm ERR! enoent This is related to npm not bei
7850
ng able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\matb.REDMOND\AppData\Roaming\npm-cache\_logs\2017-07-05T20_55_16_461Z-debug.log
Here are the file handles:
> C:\Users\matb.REDMOND\Downloads\Handle\handle.exe lodash
Code.exe pid: 21136 type: File 534: C:\source\test\node_modules\.staging\@types\lodash-4e92de43\tem plate
Code.exe pid: 21136 type: File 5E0: C:\source\test\node_modules\.staging\@types\lodash-4e92de43
and the process info for pid 21136
:
"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*
Seems that the tsserver is holding onto these files, breaking npm install
pankajparkar
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue