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.

Cannot read property 'def' of undefined

See original GitHub issue

Description: When using angular 4.0.0-rc.1, NgbTooltip doesn’t work.

Uncaught TypeError: Cannot read property 'def' of undefined at new DebugContext_ (https://unpkg.com/@angular/core@4.0.0-rc.1/bundles/core.umd.js:12759:32) at getCurrentDebugContext (https://unpkg.com/@angular/core@4.0.0-rc.1/bundles/core.umd.js:12910:16) at DebugRendererV2.createText (https://unpkg.com/@angular/core@4.0.0-rc.1/bundles/core.umd.js:12987:73) at RendererAdapter.createText (https://unpkg.com/@angular/core@4.0.0-rc.1/bundles/core.umd.js:10440:58) at PopupService._getContentRef (https://unpkg.com/@ng-bootstrap/ng-bootstrap@1.0.0-alpha.20/bundles/ng-bootstrap.js:416:52) at PopupService.open (https://unpkg.com/@ng-bootstrap/ng-bootstrap@1.0.0-alpha.20/bundles/ng-bootstrap.js:391:37) at NgbTooltip.open (https://unpkg.com/@ng-bootstrap/ng-bootstrap@1.0.0-alpha.20/bundles/ng-bootstrap.js:4868:50) at HTMLButtonElement.eval (https://unpkg.com/@angular/platform-browser@4.0.0-rc.1/bundles/platform-browser.umd.js:2992:56) at ZoneDelegate.invokeTask (https://unpkg.com/zone.js@0.7.7/dist/zone.js:363:31) at Object.onInvokeTask (https://unpkg.com/@angular/core@4.0.0-rc.1/bundles/core.umd.js:3288:45) at ZoneDelegate.invokeTask (https://unpkg.com/zone.js@0.7.7/dist/zone.js:362:36) at Zone.runTask (https://unpkg.com/zone.js@0.7.7/dist/zone.js:166:47) at HTMLButtonElement.ZoneTask.invoke (https://unpkg.com/zone.js@0.7.7/dist/zone.js:416:38)

Plunker that reproduces the issue: http://plnkr.co/edit/qpWHYlwnABD55ufSsG0d?p=preview

Angular: 4.0.0-rc.1

ng-bootstrap: 1.0.0-alpha.20

Bootstrap: 4.0.0-alpha.6

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
pkozlowski-opensourcecommented, Mar 9, 2017

For anyone reading / tracking this issue: it was confirmed as a bug in Angular itself (based on my issue report, see: https://github.com/angular/angular/issues/14872). The bug itself was already fixed in master branch of Angular via https://github.com/angular/angular/commit/ba4b6f58d9cae50e299ddec17ca6849f1de5b6ff and the fix will be part of the next Angular release (4.0.0-rc.3).

I’m going to close this issue here as:

  • there are no actionable steps remaining (bug is in Angular and is fixed already)
  • there is an easy work-around (don’t use debug mode but run you app in the production mode instead).
1reaction
MatteoNYcommented, Mar 3, 2017

Yes, still issue with Angular 4-rc2. Same issue, see Angular-cli stack below. Using boostrap 4 v1.0.0-alpha.20 @angular/cli: 1.0.0-rc.0 node: 7.6.0 os: win32 x64 @angular/common: 4.0.0-rc.2 @angular/compiler: 4.0.0-rc.2 @angular/core: 4.0.0-rc.2 @angular/forms: 4.0.0-rc.2 @angular/http: 4.0.0-rc.2 @angular/material: 2.0.0-beta.2 @angular/flex-layout: 2.0.0-rc.1 @angular/platform-browser: 4.0.0-rc.2 @angular/platform-browser-dynamic: 4.0.0-rc.2 @angular/router: 4.0.0-rc.2 @angular/cli: 1.0.0-rc.0 @angular/compiler-cli: 4.0.0-rc.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolving TypeError: Cannot Read Property of Undefined ...
Undefined means that a variable has been declared but has not been assigned a value. In JavaScript, properties and functions can only belong...
Read more >
Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >
Cannot read property 'def' of undefined · Issue #257
Hi, i am using validatorJs in react-native and when i add validation.passes() in code and run app then get this issue Cannot read...
Read more >
Sequelize - Cannot read property 'define' of undefined
In your db.js file, you are overwriting the exports variable with the Sequelize var. In node.js, module.exports == exports .
Read more >
[Solved] Cannot read Properties of Undefined in JavaScript
The "Cannot read properties of undefined" error occurs when you try to access a property or a method on a variable that stores...
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