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.

ng new when run gives "Uncaught TypeError: Cannot read property 'ApplicationRef' of undefined in console

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package @angular/cire

Is this a regression?

Yes, the previous version in which this bug was not present was: v8

Description

When you create a new application using the information in the documentation the starter page is automatically generated and although it appears to work the console log shows an Uncaught TypeError. The error should not occur (clutters up the console) and previous versions of Angular did not display this error

πŸ”¬ Minimal Reproduction

Just create a new project with ng new and then run it in Chrome

πŸ”₯ Exception or Error



Angular is running in the development mode. Call enableProdMode() to enable the production mode.
VM13 polyfills.js:185 Uncaught TypeError: Cannot read property 'ApplicationRef' of undefined
    at Object.t.toggleTracing (VM41 tracer.js:1)
    at Object.toggle (VM41 tracer.js:1)
    at VM41 tracer.js:1
    at ZoneDelegate.invokeTask (VM13 polyfills.js:413)
    at Zone.runTask (VM13 polyfills.js:181)
    at ZoneTask.invokeTask [as invoke] (VM13 polyfills.js:494)
    at invokeTask (VM13 polyfills.js:1609)
    at globalZoneAwareCallback (VM13 polyfills.js:1646)
VM15 vendor.js:81284 [WDS] Live Reloading enabled.
Navigated to http://localhost:4200/

🌍 Your Environment

Windows 10 Angular Version:




     _                      _                 ___
    / \   _ __   __ _ _   _| | __ _ _ __     / __
   / β–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |  
  / ___ \| | | | (_| | |_| | | (_| | |      | |__
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \___
                |___/                            
                                                 
                                                 
Angular CLI: 9.0.1                               
Node: 12.15.0                                    
OS: win32 x64                                    
                                                 
Angular: 9.0.0                                   
... animations, common, compiler, compiler-cli, c
... language-service, platform-browser, platform-
... router                                       
Ivy Workspace: Yes                               
                                                 
Package                           Version        
-------------------------------------------------
@angular-devkit/architect         0.900.1        
@angular-devkit/build-angular     0.900.1        
@angular-devkit/build-optimizer   0.900.1        
@angular-devkit/build-webpack     0.900.1        
@angular-devkit/core              9.0.1          
@angular-devkit/schematics        9.0.1          
@angular/cli                      9.0.1          
@ngtools/webpack                  9.0.1          
@schematics/angular               9.0.1          
@schematics/update                0.900.1        
rxjs                              6.5.4          
typescript                        3.7.5          
webpack                           4.41.2         

Anything else relevant?

Firefox does not display the error, Chrome does - all versions I’ve tried. Currently v80.0.3987.87 (Official Build)

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
alexzuzacommented, Feb 8, 2020

The Google Chrome extension which you’re using doesn’t support Angular 9 version

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular "Cannot read property 'subscribe' of undefined"
The issue seems to be the order in which your code gets executed, more specifically the getRecipes() methodΒ ...
Read more >
ERROR TypeError: Cannot read property title of undefined
How To Fix ' Uncaught TypeError : Cannot read properties of undefined ' - JavaScript Debugging Β· ANGULAR 13 TypeError Cannot read property...
Read more >
48 answers on StackOverflow to the most popular Angular ...
How can I get new selection in β€œselect” in Angular 2? Angular exception: Can't bind to 'ngForIn' since it isn't a known native...
Read more >
ApplicationRef - Angular
Get a list of component types registered to this application. This list is populated even before the component is created. components: ComponentRef<any>[], Read...
Read more >
Uncaught (in promise) TypeError: Cannot read properties of ...
Any help would be appreciated. error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'body'). apex Β· lightning-Β ...
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