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.

Intellisense doesn't work in HTML without TS files open

See original GitHub issue

Intellisense doesn’t work

Steps to reproduce the behavior:

  1. create new project using cli ng new demo

  2. Click on ‘app.component.html’

  3. See error

  4. Console output:

[Info  - 11:16:16 AM] Angular language server process ID: 3068
[Info  - 11:16:16 AM] Using typescript v3.6.4 from c:\Users\dluk\.vscode\extensions\angular.ng-template-0.900.0\node_modules\typescript\lib\tsserverlibrary.js
[Info  - 11:16:16 AM] Using @angular/language-service v9.0.0-rc.3 from c:\Users\dluk\.vscode\extensions\angular.ng-template-0.900.0\server\node_modules\@angular\language-service\bundles\language-service.umd.js
[Info  - 11:16:16 AM] Log file: c:\Users\dluk\AppData\Roaming\Code\logs\20191206T111609\exthost1\Angular.ng-template\nglangsvc.log
[Error - 11:16:19 AM] No config file for c:\Users\dluk\source\repos\dadada\demo\src\app\app.component.html

  1. Log file:
Info 0    [11:16:16.190] Format host information updated
Info 1    [11:16:16.191] reload projects.
Info 2    [11:16:16.191] Structure before ensureProjectForOpenFiles:
Info 3    [11:16:16.191] Structure after ensureProjectForOpenFiles:
Info 4    [11:16:16.191] Host file extension mappings updated
Info 5    [11:16:16.200] Search path: c:/Users/dluk/source/repos/dadada/demo/src/app
Info 6    [11:16:16.201] For info: c:/Users/dluk/source/repos/dadada/demo/src/app/app.component.html :: Config file name: c:/Users/dluk/source/repos/dadada/demo/tsconfig.json
Info 7    [11:16:16.201] Opened configuration file c:/Users/dluk/source/repos/dadada/demo/tsconfig.json
Info 8    [11:16:16.241] Loading global plugin @angular/language-service
Info 9    [11:16:16.241] Enabling plugin @angular/language-service from candidate paths: c:/Users/dluk/.vscode/extensions/angular.ng-template-0.900.0/node_modules/typescript/lib/tsserverlibrary.js/../../..,c:\Users\dluk\.vscode\extensions\angular.ng-template-0.900.0\server\node_modules\@angular\language-service\bundles\language-service.umd.js
Info 10   [11:16:16.241] Loading @angular/language-service from c:/Users/dluk/.vscode/extensions/angular.ng-template-0.900.0/node_modules/typescript/lib/tsserverlibrary.js/../../.. (resolved to c:/Users/dluk/.vscode/extensions/angular.ng-template-0.900.0/node_modules/node_modules)
Info 11   [11:16:16.326] Plugin activation warning: Missing proxied method getSmartSelectionRange in created LS. Patching.
Info 12   [11:16:16.326] Plugin activation warning: Missing proxied method getNonBoundSourceFile in created LS. Patching.
Info 13   [11:16:16.326] Plugin activation warning: Missing proxied method toLineColumnOffset in created LS. Patching.
Info 14   [11:16:16.326] Plugin activation warning: Missing proxied method getSourceMapper in created LS. Patching.
Info 15   [11:16:16.326] Plugin validation succeded
Info 16   [11:16:16.370] Starting updateGraphWorker: Project: c:/Users/dluk/source/repos/dadada/demo/tsconfig.json
Info 17   [11:16:16.372] Finishing updateGraphWorker: Project: c:/Users/dluk/source/repos/dadada/demo/tsconfig.json Version: 1 structureChanged: true Elapsed: 2ms
Info 18   [11:16:16.372] Project 'c:/Users/dluk/source/repos/dadada/demo/tsconfig.json' (Configured) 
Info 19   [11:16:16.372] 	Files (0)

Info 20   [11:16:16.372] -----------------------------------------------
Info 21   [11:16:16.373] Starting updateGraphWorker: Project: c:/Users/dluk/source/repos/dadada/demo/tsconfig.json
Info 22   [11:16:18.489] Finishing updateGraphWorker: Project: c:/Users/dluk/source/repos/dadada/demo/tsconfig.json Version: 2 structureChanged: true Elapsed: 2116ms
Info 23   [11:16:18.489] Project 'c:/Users/dluk/source/repos/dadada/demo/tsconfig.json' (Configured) 
Info 24   [11:16:18.489] 	Files (254)

Info 25   [11:16:18.489] -----------------------------------------------
Info 26   [11:16:18.493] Loading global plugin @angular/language-service
Info 27   [11:16:18.493] Enabling plugin @angular/language-service from candidate paths: c:/Users/dluk/.vscode/extensions/angular.ng-template-0.900.0/node_modules/typescript/lib/tsserverlibrary.js/../../..,c:\Users\dluk\.vscode\extensions\angular.ng-template-0.900.0\server\node_modules\@angular\language-service\bundles\language-service.umd.js
Info 28   [11:16:18.493] Loading @angular/language-service from c:/Users/dluk/.vscode/extensions/angular.ng-template-0.900.0/node_modules/typescript/lib/tsserverlibrary.js/../../.. (resolved to c:/Users/dluk/.vscode/extensions/angular.ng-template-0.900.0/node_modules/node_modules)
Info 29   [11:16:18.493] Plugin activation warning: Missing proxied method getSmartSelectionRange in created LS. Patching.
Info 30   [11:16:18.493] Plugin activation warning: Missing proxied method getNonBoundSourceFile in created LS. Patching.
Info 31   [11:16:18.493] Plugin activation warning: Missing proxied method toLineColumnOffset in created LS. Patching.
Info 32   [11:16:18.493] Plugin activation warning: Missing proxied method getSourceMapper in created LS. Patching.
Info 33   [11:16:18.493] Plugin validation succeded
Info 34   [11:16:18.496] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
Info 35   [11:16:19.669] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true Elapsed: 1173ms
Info 36   [11:16:19.669] Project '/dev/null/inferredProject1*' (Inferred) 
Info 37   [11:16:19.669] 	Files (26)

Info 38   [11:16:19.669] -----------------------------------------------

extension version: 0.900.0 package.json:

{
  "name": "demo",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~8.2.14",
    "@angular/common": "~8.2.14",
    "@angular/compiler": "~8.2.14",
    "@angular/core": "~8.2.14",
    "@angular/forms": "~8.2.14",
    "@angular/platform-browser": "~8.2.14",
    "@angular/platform-browser-dynamic": "~8.2.14",
    "@angular/router": "~8.2.14",
    "rxjs": "~6.4.0",
    "tslib": "^1.10.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.803.19",
    "@angular/cli": "~8.3.19",
    "@angular/compiler-cli": "~8.2.14",
    "@angular/language-service": "~8.2.14",
    "@types/node": "~8.9.4",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "codelyzer": "^5.0.0",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.15.0",
    "typescript": "~3.5.3"
  }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dlukcommented, Dec 9, 2019

When I open a TS file first, there is no error anymore, but when I hit F12 on a bound property or method in a template it says no definition found for

0reactions
angular-automatic-lock-bot[bot]commented, Feb 20, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No Typescript intellisense - Visual Studio Feedback
For us, Typescript intellisense doesn't work in .cshtml files in VS2017. It works in .ts files. VS also builds the .ts files to...
Read more >
VS Code Intellisense for JS files without *.d.ts - Stack Overflow
Currently my workaround is to just use a different editor (Adobe Brackets) when editing my js that I don't want compiled, so that...
Read more >
Code completion | WebStorm Documentation - JetBrains
To show you completion suggestions, WebStorm goes through the project files with the source code and adds classes, methods, functions, and ...
Read more >
JavaScript and TypeScript in Visual Studio | Microsoft Learn
Learn how Visual Studio provides rich support for JavaScript development, both using JavaScript directly, and also using the TypeScript ...
Read more >
Add intellisense for third-party JavaScript libraries in VS Code ...
You may have noticed that if you use a script tag to include a library, you don't get any intellisense suggestions in your...
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