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.

Typeahead crashes on v2.0.0-alpha.0 TypeError: Object(...) is not a function

See original GitHub issue

Bug description:

Today I install this amazing library, but when I tried to use typeahead I got next error at browser console:

CapturarComponent.html:17 ERROR TypeError: Object(...) is not a function
    at new NgbTypeahead (typeahead.js:52)
    at createClass (core.js:12449)
    at createDirectiveInstance (core.js:12284)
    at createViewNodes (core.js:13742)
    at createEmbeddedView (core.js:13619)
    at callWithDebugContext (core.js:15056)
    at Object.debugCreateEmbeddedView [as createEmbeddedView] (core.js:14368)
    at TemplateRef_.createEmbeddedView (core.js:11694)
    at ViewContainerRef_.createEmbeddedView (core.js:11406)
    at NgTemplateOutlet.ngOnChanges (common.js:3482)

Link to minimally-working plunker that reproduces the issue:

Plunker demo was not possible due to when I tried to reproduce the issue I realized that my local version was v2.0.0-alpha.0 and the plunker one is v1.1.1 image

By the way, installed this library by using: npm install --save @ng-bootstrap/ng-bootstrap And I got an alpha version? Was that purposely? Wouldn’t be better to fix documentation to download stable or unstable versions?

Version of Angular, ng-bootstrap, and Bootstrap:

Angular 5.2.0 ng-bootstrap: v2.0.0-alpha.0 Bootstrap:4.1.0

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
pkozlowski-opensourcecommented, Apr 13, 2018

It should be fixed on npm now

1reaction
pkozlowski-opensourcecommented, Apr 13, 2018

@bastienmoulia you are right - will cut a new release with proper next / last pointers later today. Thnx!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ng-bootstrap typeahead TypeError: Object(...) is not a function
So my Problem was solved by installing a stable version of ng-bootstrap: so package.json file : `dependencies .
Read more >
Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError - Some selector is not a function - jQuery is not a function - owlCarousel...
Read more >
How to fix "Uncaught TypeError: x is not a function" in JavaScript
JS Casts 01 - How to fix "Uncaught TypeError : x is not a function " in JavaScript.Visit https://javascriptcasts.com/episodes/01 for a summary ...
Read more >
TypeError: Object(...) is not a function : r/reactjs - Reddit
TypeError : Object(...) is not a function. Hello,. While working in React I made an ES6 arrow function. When I saved my work...
Read more >
Error Autocomplete - Uncaught TypeError - Laracasts
Hello, i want create autocomplete from database, but autocomplete not show up and always got error Uncaught TypeError: b.toLowerCase is not a function....
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