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

Bug: Autocomplete No Longer Works With Angular 6 #256

Closed
ewaschenko opened this issue May 28, 2018 · 38 comments
Closed

Bug: Autocomplete No Longer Works With Angular 6 #256

ewaschenko opened this issue May 28, 2018 · 38 comments

Comments

@ewaschenko
Copy link

ewaschenko commented May 28, 2018

With my current project that I have upgraded since Angular 2, the plugin's autocomplete no longer works with Angular 6. The plugin is able to provide errors, hints, and navigation only after the variable has been fully typed and a few seconds have passed.

I just created a brand new project with ng new my-app, opened the project in VS Code and installed the plugin and I get the same behavior, autocomplete not working.

Also not getting any autocomplete for the Material CDK. For example cdkConnectedOverlay as shown here

https://youtu.be/kYDLlfpTLEA?t=612

Angular CLI: 6.0.5
Angular: 6.0.3
Typescript: 2.7.2

@wszgrcy
Copy link

wszgrcy commented May 30, 2018

some project can work some can't.Why?

@suchismita1234
Copy link

Not working for me too.. Need help..

@ewaschenko
Copy link
Author

@chuckjaz It seems the autocomplete feature is not working for Angular & Material 6+. The extension uses @angular/language-service@5.2.2-250c8da and typescript@2.6.2. Does it need to be updated for 6.0.0?

@wszgrcy
Copy link

wszgrcy commented Jun 3, 2018

@ewaschenko How to complie by self?Is it simple?I git source but it seems complie on linux()

@parion
Copy link

parion commented Jun 8, 2018

Yeah, this plugin is doing nothing for me. In the output, I'm seeing the following logs being constantly repeated as I configure my HTML file

getCompletions: XXms
getDiagnostics: XXms
updating project structure from ...
getTemplateReferences: 0ms
getTemplateReferences: 0ms
updated: ng - 0ms

Where X is some number

@ewaschenko
Copy link
Author

@parion I'm getting the same thing as you when I type a variable that should be autocompleted.

getCompletions: 227ms
getDiagnostics: 11ms
updating project structure from ...
getTemplateReferences: 0ms
updated: ng - 0ms

I checked out a project where autocomplete works, and I get similar stats.

@parion
Copy link

parion commented Jun 8, 2018

I checked out a project where autocomplete works, and I get similar stats.

Ok so that's not useful. Might try forking the project this weekend and see if I can find a solution or the bug myself to get this plugin working again with Angular 6. Doesn't help I have little Angular experience, but I really want this plugin to work.

@ewaschenko
Copy link
Author

@parion If you create a new project with ng new my-app does the autocomplete work for you? Because the project where autocomplete works I created it not too long ago and it uses Angular 6.0.3 and Typescript 2.7.2 The project where autocomplete doesn't work I upgraded from Angular 4 to 5 to 6.

@parion
Copy link

parion commented Jun 8, 2018

The project I'm currently working on where I'm having this issue was created by the CLI with ng new APP.

@wszgrcy
Copy link

wszgrcy commented Jun 9, 2018

@parion I want to help with updating source,but some type declarations and extension apis I can not find document .

@guilhermewaess
Copy link

Here isn`t working as well. Created a new project with "ng new" and there is no intellisense, auto-completion/import.

@sebastiandg7
Copy link

Same happening here. Is there any way to downgrade the extension?

@AndresVD21
Copy link

Same error here, I've seen that the auto completion seems to be available again once the package has been manually import.

@parion
Copy link

parion commented Jun 27, 2018

How did you manually import the package @AndresVD21?

@AndresVD21
Copy link

Just do something like:

import { } from '@angular/router' 

And then try to use any module like RouterModule then VSCode will autocomplete the imports normally from that package.

@parion
Copy link

parion commented Jun 27, 2018

That's a feature of VS Code as methods and properties are autocompleted from imported packages. This works even with Angular Language Service disabled.

@ewaschenko
Copy link
Author

Also found that the language service does not apply autocomplete or navigation for directives, according to the Angular Docs it should:

Navigation allows you to hover to see where a component, directive, module, etc. is from and then click and press F12 to go directly to its definition.

I created a simple directive, added it to my app.module etc and it does not provide autocomplete when used inside a template or navigation after it has been typed.

I also found out that autocomplete works for me if I'm using the inline template but not template URL. Directive navigation still doesn't work though.

@chuckjaz Any Updates?

@mart2k
Copy link

mart2k commented Aug 7, 2018

Same here. Any Updates?

@parion
Copy link

parion commented Aug 8, 2018

None it seems. This project was updated over half a year ago, with no further updates from the owner. It may be dead.

@Teamop
Copy link

Teamop commented Aug 30, 2018

v0.1.10 is out with angular-language-service 6.1 and TS 2.7, thanks @kyliau

@henrysachs
Copy link

I still dont have autocomplete on HTML Templates. Is there a way to debug this?

@IDiamondDragon
Copy link

Yes I have the same problem

@Sergged
Copy link

Sergged commented Oct 14, 2018

The same problem for me too. Create the project with ng new and Angular Language Service doesn't work. I have no idea how to fix it. Anybody?

@Sergged
Copy link

Sergged commented Nov 8, 2018

I have found the solution. Create ng new project in root of your harddrive (for example C:\ if you use Windows). The error with that all was localization symbols, in my case Cyrillic characters. So, use place for your project with Latin characters in the directory path. Thats all

@henrysachs
Copy link

that didn't work out for me. I don't have any symbols in my path.

@Sergged
Copy link

Sergged commented Nov 9, 2018

Write your angular/cli version and path of working project. I use angular cli 7.0.4, typescript 3.1.3, node 10.13.0 and "C:\Global Projects{name of foulder}"

@henrysachs
Copy link

Angular CLI: 6.1.3
Node: 9.7.1
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.7.3
@angular-devkit/core         0.7.3
@angular-devkit/schematics   0.7.3
@schematics/angular          0.7.3
@schematics/update           0.7.3
rxjs                         6.2.2
typescript                   2.9.2

D:\Projekte{name of the folder}

is my config

@Sergged
Copy link

Sergged commented Nov 9, 2018

Try for intresting the latest angular/cli (7.0.4), I remember somewhere I see bug fix commit in angular github repository, maybe in your version you havn't it. If updating to latest version of cli doesn't help, you can change localization language of VS Code to English (if possible), and check version of Angular Language Service extansion. Is VS Code installed in D harddrive?

@ahmadali7
Copy link

Nothing works for me too. can anyone help?

@henrysachs
Copy link

i updated all deps and my vscode is on the same harddrive as my project

@filips92
Copy link

filips92 commented Jan 4, 2019

I had the same problem with the extension not working but I have it working now. What helped me was a suggestion of my friend to check out the logs of the extensions. I didn't find them but this eventually guided me to "Help -> Toggle Developer Tools". It opened devtools just like in Chrome and in the "Console" tab there was an error coming from the extension. The error was something like "The language client requires VS Code version ^1.26 but received version 1.25.1". After updating the VS Code itself the problem disappeared and the extension is working now.

@EdwinCloud101
Copy link

Nothing worked for me. Does anyone have update on this?

@qwabra
Copy link

qwabra commented Feb 8, 2019

disable all extensions in VSCode, Installing in your project and "use workspace version" of typescript
settings.json

{
	"typescript.tsdk": "node_modules/typescript/lib"
}

helps me

@samuelt1
Copy link

check the VSCode output logs. I had an issue with my JSON file that was not readily apparent. click output then select angular language services in the drop down and you should see why it did not work:
image

@kyliau
Copy link
Contributor

kyliau commented Jun 1, 2019

@samuelt1 do you mind sharing how your tsconfig.json is like?
I also noticed you're using an older version of language service.
Do you mind trying the latest version and see if that's still an issue?
https://github.com/angular/vscode-ng-language-service/releases/tag/v0.800.0

@fabianedl777
Copy link

I have the same problem that @samuelt1

This is my tsconfig.json

{ "compileOnSave": false, "compilerOptions": { "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "target": "es5", "typeRoots": [ "node_modules/@types" ], "lib": [ "es2016", "dom" ], "module": "es2015", "baseUrl": "src", "paths": { "@project-1-core/*": ["../projects/project-1/src/app/core/*"], } } }

@kyliau
Copy link
Contributor

kyliau commented Jun 17, 2019

@fabianedl777 Issue is tracked by angular/angular#21729

I'm closing this since a lot of the recent comments are not related to the original issue.
Please try the latest version 8 release, and if it's still not working, feel free open a new issue.
Thank you!

@kyliau kyliau closed this as completed Jun 17, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests