You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Debug Failure. False expression: Expected isNewFile for (only) new files #27867
We have occurrences from 3.0.0-dev to 3.2.0-dev. Here's a stack from 3.1.3:
Error processing request. Debug Failure. False expression: Expected isNewFile for (only) new files
Verbose Debug Information: {"isNewFile":false,"hasScriptInfo":false}
Error: Debug Failure. False expression: Expected isNewFile for (only) new files
Verbose Debug Information: {"isNewFile":false,"hasScriptInfo":false}
at mapTextChangesToCodeEdits (tsserver.js:123151:22)
at IOSession.Session.mapTextChangeToCodeEdit (tsserver.js:122984:24)
at tsserver.js:122981:73
at Array.map (<anonymous>)
at IOSession.Session.mapTextChangesToCodeEdits (tsserver.js:122981:36)
at IOSession.Session.mapCodeFixAction (tsserver.js:122977:84)
at tsserver.js:122930:96
at Array.map (<anonymous>)
at IOSession.Session.getCodeFixes (tsserver.js:122930:55)
at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (tsserver.js:121789:61)
at tsserver.js:123086:88
at IOSession.Session.executeWithRequestId (tsserver.js:123077:28)
at IOSession.Session.executeCommand (tsserver.js:123086:33)
at IOSession.Session.onMessage (tsserver.js:123106:35)
at Interface.<anonymous> (tsserver.js:124369:27)
at emitOne (events.js:116:13)
at Interface.emit (events.js:211:7)
at Interface._onLine (readline.js:282:10)
at Interface._normalWrite (readline.js:424:12)
at Socket.ondata (readline.js:141:10)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at Pipe.onread (net.js:594:20)
I'm seeing this error from tsserver in my editor (Vim with YCM) (with almost the same stacktrace) when I have import fs = require('fs'); style import in my Node project (target=es2017, everything else is the default). Switching to const fs = require('fs') makes the error go away.
I just found out it only happened when I used import = require style import on a module without type annotations, but this still looks like a bug -- it shouldn't crash the server. tsc is still able to tell me to try npm install @types/..., among other errors.
Adam Menges (@adammenges) Please provide complete tsserver log for us to be able to investigate this futher. Thanks. We will open this again when we have more information. Thanks
Activity
amcasey commentedon Oct 12, 2018
Quite possibly - I've been looking at several. Let me confirm.
amcasey commentedon Oct 12, 2018
Fixed - sorry about that.
Hexcles commentedon Oct 17, 2018
I'm seeing this error from tsserver in my editor (Vim with YCM) (with almost the same stacktrace) when I have
import fs = require('fs');style import in my Node project (target=es2017, everything else is the default). Switching toconst fs = require('fs')makes the error go away.Hexcles commentedon Oct 17, 2018
I just found out it only happened when I used
import = requirestyle import on a module without type annotations, but this still looks like a bug -- it shouldn't crash the server.tscis still able to tell me to trynpm install @types/..., among other errors.6 remaining items
tim-phillips commentedon Dec 27, 2018
I installed Visual Studio Code and it somehow fixed this issue for me in vim/ycm.
sheetalkamat commentedon Jan 3, 2019
Closing this as it seems fixed in recent build. Andrew Casey (@amcasey) please reopen if this repros in newer builds.
amcasey commentedon Jan 22, 2019
I see recent hits for
getEditsForFileRename,getEditsForRefactor, andgetCodeFixesin3.3.0-dev,3.3.0-dev.20190101, and3.3.0-dev.20190108.sheetalkamat commentedon Jan 22, 2019
Andrew Casey (@amcasey) I think #26280 should also fix it. So if any reports of this after
3.3.0-dev.20190109would qualify for reinvestigation.adammenges commentedon Feb 10, 2019
I currently see this in Atom with atom-typescript:
sheetalkamat commentedon Feb 11, 2019
Adam Menges (@adammenges) Can you please share the tssever log of the issue? Thanks.
sheetalkamat commentedon Mar 6, 2019
Adam Menges (@adammenges) Please provide complete tsserver log for us to be able to investigate this futher. Thanks. We will open this again when we have more information. Thanks