question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Language service not loading with config option "files: []"

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:32 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
kyliaucommented, May 29, 2020

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!

1reaction
ayazhafizcommented, May 27, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular language service in VSCode does not work because ...
Update: I tried it in a new project in Angular 13. So it seems some issue with the config itself. Will keep you...
Read more >
Angular Language Service In Vscode Does Not Work ...
The configuration options from the base file are loaded first then overridden by When true the compiler does not check the TypeScript version...
Read more >
Visual Studio Code Display Language (Locale)
The Configure Display Language command writes to the Runtime Configuration Arguments file argv.json in your user VS Code folder ( .vscode ). The...
Read more >
Deployment - Angular
Simple deployment optionslink. Before fully deploying your application, you can test the process, build configuration, and deployed behavior by using one of ...
Read more >
Documentation - tsc CLI Options - TypeScript
Flag Type Default ‑‑allowJs boolean false ‑‑allowUmdGlobalAccess boolean false ‑‑allowUnreachableCode boolean
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found