ts-namespace-import-plugin icon indicating copy to clipboard operation
ts-namespace-import-plugin copied to clipboard

Exception: "Cannot read property 'getText' of undefined"

Open OliverJAsh opened this issue 3 years ago • 0 comments

I opened a file with this content:

import * as O from 'fp-ts/Option';

I waited for TS to initialise and then started to type O..

I then opened the TS server log (I was debugging a TS performance issue) and saw this exception:

Err 2083  [11:32:54.016] Exception on executing command {"seq":21,"type":"request","command":"getCodeFixes","arguments":{"file":"/Users/oliverash/Development/unsplash-web/app/helpers/input.ts","startLine":2,"startOffset":3,"endLine":2,"endOffset":3,"errorCodes":[1003]}}:

    Cannot read property 'getText' of undefined

    TypeError: Cannot read property 'getText' of undefined
        at Object.proxy.getCodeFixesAtPosition (/Users/oliverash/.vscode/extensions/unsplash.ts-refactor-tools-0.2.0/node_modules/@unsplash/ts-refactor-tools/dist/index.js:38:39)
        at IOSession.Session.getCodeFixes (/Users/oliverash/Development/unsplash-web/node_modules/typescript/lib/tsserver.js:164898:64)
        at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/Users/oliverash/Development/unsplash-web/node_modules/typescript/lib/tsserver.js:163550:61)
        at /Users/oliverash/Development/unsplash-web/node_modules/typescript/lib/tsserver.js:165211:88
        at IOSession.Session.executeWithRequestId (/Users/oliverash/Development/unsplash-web/node_modules/typescript/lib/tsserver.js:165202:28)
        at IOSession.Session.executeCommand (/Users/oliverash/Development/unsplash-web/node_modules/typescript/lib/tsserver.js:165211:33)
        at IOSession.Session.onMessage (/Users/oliverash/Development/unsplash-web/node_modules/typescript/lib/tsserver.js:165237:35)
        at Interface.<anonymous> (/Users/oliverash/Development/unsplash-web/node_modules/typescript/lib/tsserver.js:167834:31)

OliverJAsh avatar Jun 30 '21 10:06 OliverJAsh