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.

Error for getTemplateReferences (cannot read property 'name' of null)

See original GitHub issue

Hi! I have similiar issue to #182 (another TypeError though). Unfortunatelly, for now Angular Language Service doesn’t work for me at all. Here’s the error message I’m getting.

Angular Language Service: 5.0.0-beta.5 TypeScript: 2.4.2 Error for getTemplateRefrences: TypeError: Cannot read property ‘name’ of null at CompileMetadataResolver._getEntryComponentMetadata (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules@angular\language-service\bundles\language-service.umd.js:9258:38) at C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules@angular\language-service\bundles\language-service.umd.js:8915:53 at Array.map (native) at CompileMetadataResolver.getNgModuleMetadata (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules@angular\language-service\bundles\language-service.umd.js:8915:18) at addNgModule (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules@angular\language-service\bundles\language-service.umd.js:16824:41) at C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules@angular\language-service\bundles\language-service.umd.js:16835:14 at Array.forEach (native) at _createNgModules (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules@angular\language-service\bundles\language-service.umd.js:16834:26) at analyzeNgModules (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules@angular\language-service\bundles\language-service.umd.js:16731:14) at TypeScriptServiceHost.ensureAnalyzedModules (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules@angular\language-service\bundles\language-service.umd.js:39118:17) getTemplateRefrences: 6365ms SERVER ERROR: Cannot read property ‘length’ of null TypeError: Cannot read property ‘length’ of null at Project.updateFileMap (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:797:94) at Project.updateGraph (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:815:14) at Project.finishGraph (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:807:14) at ProjectService.openConfigFile (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:1634:17) at ProjectService.openOrUpdateConfiguredProjectForFile (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:1486:41) at ProjectService.openClientFile (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:1404:23) at C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\documents.js:135:47 at TextDocuments.logErrors (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\documents.js:235:13) at C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\documents.js:131:74 at handleNotification (C:\Users\Acer01.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules\vscode-jsonrpc\lib\main.js:353:21) [Error - 08:27:03] Notification handler ‘textDocument/didOpen’ failed with message: Cannot read property ‘length’ of null

tsconfig.js

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
sandangelcommented, Nov 17, 2017

Any fix? I have the same problem with language service 5.0.2 too

0reactions
angular-automatic-lock-bot[bot]commented, Feb 15, 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

how to fix this TypeError: Cannot read property 'name' of null
Although Role is not null , The value of Role.name is null , meaning that it has no value assigned to it. That...
Read more >
Getting Error: Cannot read property "variables" from null,Detail
I am getting this error "Error: Cannot read property "variables" from ... var names = nameProvided.split(' ');. var firstName = names[0];.
Read more >
TFS 2018 RC2 Cannot read property 'name' of null - error on ...
I use a filter with a specific iteration on a storyboard. For example, iteration 1. An error occurred when the administrator deleted iteration...
Read more >
TypeError: Canont read property "name" from null
However, when I ran the first test , it errors out that it cannot read property name from null. any idea ? CreateNewVM.png....
Read more >
Keep getting error message "Cannot read property '1' of null"
Trying to assign variable listItems to the HTML collection of all list items containing the tag <u1>
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