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 TypeError: "this.container is undefined"

See original GitHub issue

I am getting issue with angular 9

    setStyles ng-simple-slideshow.js:517
    ngDoCheck ng-simple-slideshow.js:189
    Angular 27
    RxJS 5
    Angular 9
core.js:5871:19

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ekhmoicommented, Mar 16, 2020

In Angular9 ViewChild requires to specify {static: boolean}.

I think it can be fixed(maybe not completely) by adding {static: true} to below lines. https://github.com/dockleryxk/ng-simple-slideshow/blob/f563ac58b8c20e27caeaa0be9b2258560604b99a/src/app/modules/slideshow/slideshow.component.ts#L66

  @ViewChild('container', { static: true }) container: ElementRef;
  @ViewChild('prevArrow', { static: true }) prevArrow: ElementRef;
  @ViewChild('nextArrow', { static: true }) nextArrow: ElementRef;
1reaction
Guleycommented, Mar 13, 2020

Here what I got while debugging issue. may this will help you out Package "ng-simple-slideshow" has an incompatible peer dependency to "@angular/core" (requires "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" (extended), would install "9.1.0-next.4")

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ember-Data "TypeError: this.container is undefined"
The console logs TypeError: this.container is undefined while the Ember debugger shows every promise is fulfilled and the users.current ...
Read more >
ERROR TypeError: "this.container is undefined" for NbDialog
Issue type I'm submitting a bug report feature request Unknown cause, ... ERROR TypeError: "this.container is undefined" for NbDialog #2060.
Read more >
[Solved] Uncaught typeerror: container is null - CodeProject
Simple: there is no element with an ID of " container " so getElementById returns null , just as it is intended to...
Read more >
ViewContainerRef - Angular
Represents a container where one or more views can be attached to a component. ... abstract class ViewContainerRef { abstract element: ElementRef abstract ......
Read more >
"Cannot ready property 'container' of null" when using musicKit
Solution: In chrome at least, musicKit.js requires that the site being hosted is using SSL. This was not a problem for me running...
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