-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Intellisense - Import suggestions show up but are not inserted/loaded? #27636
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
Comments
@Alexand3r I can't reproduce this debug failure. Can you please share the |
Hi. import React, { Component } from 'react'
class MyComponent extends Component {
render() {
return (
<div></div>
)
}
}
export default MyComponent So, the result on Ctrl+space is |
What @darwinserrano showed, however, as seen in the picture, mine throws an error and does nothing with no jsconfig and with a jsconfig where the "target" and "modules" are changed as long as the target is not commonjs, i get the
Issue |
I think I'm having the same issue, suggestions show up, but they don't automatically import the file anymore. It works perfectly fine in 1.27, but it's broken in 1.28 and the insiders build. ❌ In Insiders build and 1.28 it only shows the suggestion, but it doesn't automatically import the file: ✅ In 1.27 it suggests to automatically import the file: This isn't isolated to just React components btw, constant values, functions etc. don't show the import suggestion anymore either. As a side note, I tried to use the workspace version of TypeScript (3.0.3) but that didn't resolve the problem and actually made it worse because it wouldn't show suggestions for functions, components etc. living in other files at all anymore. |
Here's a part of my
|
@sandersn please make sure the fix makes its way into both |
A small update on the issue
|
@Alexand3r so it sounds like the issue is fixed with |
@Andy-MS and I confirmed that it is fixed on 3.1 and master and broken on, at least, 3.0.3. |
@sandersn yes it is fixed, but only if all instances of typescript have been removed (including npm modules dependant on typescript) |
From @Alexand3r on October 9, 2018 13:3
As the title, when I try to "auto import" a component in a React Project , intellisense shows the suggestion, but on selecting it, it is not inserted
Steps to Reproduce:
1.Type in render function any React Component from any package ( my case from @material-ui/core the component TableHead, however it is not limited to this )
2. Press ctrl+space for Intellisense suggestion
3. Select Suggestion TableHead (tried with both mouse and keyboard arrows, same result)
4. Nothing happens, the small window for details doesn't show, however the suggestion is there.
Small note: This has been happening since ~ 1.20, however the imports would be imported at one point after some loading time, was blaming the huge number of node modules and the heavy usage of the machine. However with 1.28, it's dead.
Does this issue occur when all extensions are disabled?: Yes
Edit: This also happens in Visual Studio Code Insiders 1.29 version
I've set the typescript.tsserver.trace to verbose and got this :
the ****** are to hide the project
Edit Insiders log:
Copied from original issue: microsoft/vscode#60314
The text was updated successfully, but these errors were encountered: