Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto import fails to add due to VSCode typescript version #32223

Closed
rrivem opened this issue Jun 28, 2019 · 4 comments
Closed

Auto import fails to add due to VSCode typescript version #32223

rrivem opened this issue Jun 28, 2019 · 4 comments
Assignees
Labels
Needs More Info The issue still hasn't been fully clarified

Comments

@rrivem
Copy link

rrivem commented Jun 28, 2019

  • VSCode Version: 1.35.1
  • OS Version: OS X 10.14.5

Steps to Reproduce:

  1. Launch VS Code and open a javascript project and wait for the "Initializing JS/TS language features"
  2. Open a js file and type a function/object exported from another module
  3. Intellisense will show the symbol but when hovering, the "Auto import from '...'" does not
  4. Clicking or hitting enter does NOT import the symbol.

Does this issue occur when all extensions are disabled?: Yes

I've found many issues reporting like #61660, but installing typescript@next globally does not fix the issue.

Tracking VSCode older versions, I tracked the issue started in version 1.28, works fine in 1.27 which uses typescript 3.0.3 internally, but installing typescript@3.0.3 globally does not fix the issue either.

The only workaround I found was to go inside "Visual Studio Code.app" and installing typescript 3.0.3 locally in "Contents/Resources/app/extensions".

Here are the tsserver logs for TypeScript output:

[Trace  - 12:13:44 PM] Sending request: completionEntryDetails (54). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "/Users/rodri/dev/ceipfo/client/components/personas/detalle/trabajo-final/TrabajoFinal.jsx",
    "line": 5,
    "offset": 69,
    "entryNames": [
        {
            "name": "formatBool",
            "source": "/Users/rodri/dev/ceipfo/client/utils/bool"
        }
    ]
}
[Trace  - 12:13:44 PM] Response received: completionEntryDetails (54). Request took 27 ms. Success: false . Message: Error processing request. Debug Failure.
Error: Debug Failure.
    at Object.assertDefined (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:2080:24)
    at getDefaultExportInfoWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:115542:80)
    at getDefaultLikeExportInfo (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:115523:24)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:115320:35
    at forEachExternalModule (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:115663:21)
    at getAllReExportingModules (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:115315:13)
    at Object.getImportCompletionAction (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:115301:31)
    at getCompletionEntryCodeActionsAndSourceDisplay (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:99848:33)
    at Object.getCompletionEntryDetails (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:99812:30)
    at Object.getCompletionEntryDetails (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:122110:35)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:131177:57
    at Object.mapDefined (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:670:30)
    at IOSession.Session.getCompletionEntryDetails (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:131175:33)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:130106:61)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:131665:88
    at IOSession.Session.executeWithRequestId (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:131656:28)
    at IOSession.Session.executeCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:131665:33)
    at IOSession.Session.onMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:131687:35)
    at Interface.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:132978:27)
    at Interface.emit (events.js:182:13)
    at Interface._onLine (readline.js:290:10)
    at Interface._normalWrite (readline.js:433:12)
    at Socket.ondata (readline.js:149:10)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:279:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at Pipe.onread (net.js:636:20)
@mjbvz mjbvz transferred this issue from microsoft/vscode Jul 2, 2019
@microsoft microsoft deleted a comment from vscodebot bot Jul 2, 2019
@mjbvz
Copy link
Contributor

mjbvz commented Jul 2, 2019

A few potentially related TS issues:

@rrivem Can you please confirm you see this using the latest typescript@next build. Also, can you share the project this happens on?

@rrivem
Copy link
Author

rrivem commented Jul 4, 2019

Hi @mjbvz, I installed typescript@next within the VSCode application and doesn't fix the issue. Also setting the allowSyntheticDefaultImports=false in the jsconfig.json doesn't work either.

Sorry I can't share the project, but as @donovanhiland commented in #31975, it might be for the project having many files (~1,400).

@RyanCavanaugh RyanCavanaugh added the Needs More Info The issue still hasn't been fully clarified label Jul 10, 2019
@RyanCavanaugh
Copy link
Member

We need a way to repro this failure

@mjbvz
Copy link
Contributor

mjbvz commented Nov 6, 2019

Closing as we cannot investigate this without repo steps

@mjbvz mjbvz closed this as completed Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

No branches or pull requests

3 participants