-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.
Milestone
Description
TypeScript Version: 3.8.0-dev-2019-11-05 and 3.7.2
Search Terms:
- Untitled file / buffer
Repo
(Tested on windows)
- Open the VS Code repo.
- Have a single file
refactor.tsopen: https://github.com/microsoft/vscode/blob/master/extensions/typescript-language-features/src/features/refactor.ts - Reload window to make sure you are in a clean state
- Wait for TS to finish loading in
refactor.ts - Now create an untitled file (ctrl+n)
- Change the language mode of the new file to
Typescript(without saving it)
Bug
Cannot read property 'path' of undefined
TypeError: Cannot read property 'path' of undefined
at ProjectService.updateNonInferredProjectFiles (tsserver.js:137488:43)
at ProjectService.addFilesToNonInferredProject (tsserver.js:137378:22)
at ProjectService.updateRootAndOptionsOfNonInferredProject (tsserver.js:137526:22)
at ProjectService.loadConfiguredProject (tsserver.js:137462:22)
at ProjectService.createAndLoadConfiguredProject (tsserver.js:137402:22)
at ProjectService.createLoadAndUpdateConfiguredProject (tsserver.js:137407:36)
at ProjectService.assignProjectToOpenedScriptInfo (tsserver.js:138230:44)
at tsserver.js:138461:107
at Object.mapDefined (tsserver.js:565:30)
at ProjectService.applyChangesInOpenFiles (tsserver.js:138461:48)
at Session.handlers.ts.createMapFromTemplate._a.<computed> (tsserver.js:139315:46)
at tsserver.js:140973:88
at IOSession.Session.executeWithRequestId (tsserver.js:140964:28)
at IOSession.Session.executeCommand (tsserver.js:140973:33)
at IOSession.Session.onMessage (tsserver.js:140996:35)
at Interface.<anonymous> (tsserver.js:142311:27)
at Interface.emit (events.js:200:13)
at Interface._onLine (readline.js:314:10)
at Interface._normalWrite (readline.js:459:12)
at Socket.ondata (readline.js:170:10)
at Socket.emit (events.js:200:13)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
at Socket.Readable.push (_stream_readable.js:210:10)
This seems to be caused by the line
TypeScript/src/server/editorServices.ts
Line 1854 in 35a6426
| scriptInfo = this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(normalizedPath, project.currentDirectory, scriptKind, hasMixedContent, project.directoryStructureHost)!; // TODO: GH#18217 |
related issues
/cc @sheetalkamat
Metadata
Metadata
Assignees
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.