vscode-ng-language-service: Language service not loading with config option "files: []"

Describe the bug

Angular HTML Template syntax validation/completion/intelli-sense are not working.

To Reproduce

Steps to reproduce the behavior:

  1. npm install -g @angular/cli@next
  2. ng new angular10example
  3. cd angular10example
  4. npm i
  5. Open project in VSCode with Angular Language Service extension installed

Expected behavior

Angular HTML template editor should provide validition, syntax checking, completion and “go to definition” functionality. Etc etc.

Logs

Please attach two logs:

  1. Console output (Go to toolbar --> View --> Output, and copy the contents)
[Info  - 4:28:28 PM] Angular language server process ID: 34506
[Info  - 4:28:28 PM] Using typescript v3.8.3 from /Users/lincoln/.vscode/extensions/angular.ng-template-0.901.9/node_modules/typescript/lib/tsserverlibrary.js
[Info  - 4:28:28 PM] Using @angular/language-service v9.1.9 from /Users/lincoln/.vscode/extensions/angular.ng-template-0.901.9/server/node_modules/@angular/language-service/bundles/language-service.umd.js
[Info  - 4:28:28 PM] Log file: /Users/lincoln/Library/Application Support/Code/logs/20200526T132525/exthost4/Angular.ng-template/nglangsvc.log
[Info  - 4:28:30 PM] Disabling language service for /Users/lincoln/projects/maritlabs/libraries/angular10example/tsconfig.json because it is not an Angular project ('@angular/core/core.d.ts' could not be found). If you believe you are seeing this message in error, please reinstall the packages in your package.json.
[Error - 4:28:30 PM] No config file for /Users/lincoln/projects/maritlabs/libraries/angular10example/src/app/app.component.html
  1. Log file (Path is printed to the console output at startup)

nglangsvc.log

Screenshots

image

image

Additional context

Not sure when this stopped working. It actually hasn’t been working for me for about a week, even in my Angular 9 project, and I haven’t been able to figure out what’s causing the problem, but I’ve since upgraded to Angular 10 and it’s still not working.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 32 (11 by maintainers)

Most upvoted comments

tldr; Angular extension v0.1000.0-rc.0 has been released and can be downloaded here. If you’d like to try it out, please keep in mind that it has to be installed manually. See here for installation instructions.

  • typescript 3.9 introduced “solution-style” tsconfig, and it is not supported by prior ts versions.
  • latest version of Angular (v9) and the language service extension uses typescript 3.8.
  • “solution-style” tsconfig is enabled in Angular CLI in https://github.com/angular/angular-cli/pull/17586.
  • In order for this to work, language service extension has to upgrade to both angular v10 and typescript 3.9. We’ve just released a rc version of the extension that supports this. Since this is rc, the binary is not deployed to visual studio marketplace, so installation has to be done manually.

Hopefully this clears up the confusion why the extension is not working for users who are currently using Angular v10 rc. As always, please let us know if you run into any issues, and thank you for helping us test v10 rc!

Yeah, let’s leave this open for now. We don’t want the only solution to be deleting a config auto-generated by Angular.