ERROR TypeError: You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.

See original GitHub issue

I tried with below code, pass compiling, but when going into the page with the date picker, it throws error like below. Also the spinner in date picker doesn’t work.

<mat-form-field>
  <input matInput [ngxMatDatetimePicker]="picker">
  <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
  <ngx-mat-datetime-picker #picker></ngx-mat-datetime-picker>
</mat-form-field>

Below is the error stack.

core.js:4196 ERROR TypeError: You provided ‘undefined’ where a stream was expected. You can provide an Observable, Promise, Array, or Iterable. at subscribeTo (subscribeTo.js:27) at subscribeToResult (subscribeToResult.js:11) at MergeMapSubscriber._innerSub (mergeMap.js:59) at MergeMapSubscriber._tryNext (mergeMap.js:53) at MergeMapSubscriber._next (mergeMap.js:36) at MergeMapSubscriber.next (Subscriber.js:49) at Observable._subscribe (subscribeToArray.js:3) at Observable._trySubscribe (Observable.js:42) at Observable.subscribe (Observable.js:28) at MergeMapOperator.call (mergeMap.js:21)

I tried to reproduce this bug on Stackblitz (https://stackblitz.com/edit/angular-ivy-hfg2a4), but it throws error: Error in ~/src/main.ts ngcc failed to run on @angular-material-components/moment-adapter@4.0.1, @angular-material-components/datetime-picker@4.0.1.

version: Angular 10 “@angular-material-components/datetime-picker”: “^4.0.1”, “@angular-material-components/moment-adapter”: “^4.0.1”,

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
h2qutccommented, Aug 4, 2020

@tenglongroy @achablowski I could reproduce this bug. I am trying to fix it soon.

5reactions
h2qutccommented, Aug 13, 2020

@nikolaifedorov Thank you very much. The codes that you found help me a lot. @tenglongroy @fjc2112 @achablowski @bluee Sorry for late reply. A new version @angular-material-components/datetime-picker v4.0.2 has already been released to resolve this bug. Thanks all for your support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

You provided an invalid object where a stream was expected ...
I received a similar issue: You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
Read more >
Resolve! TypeError: You provided 'undefined' where a stream ...
TypeError : You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
Read more >
Angular 9 HTTP Post request Error. You provided 'undefined ...
You can provide an Observable, Promise, Array, or Iterable ... ERROR TypeError: You provided 'undefined' where a stream was expected.
Read more >
You provided 'undefined' where a stream was expected #1113
"ERROR TypeError: You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.".
Read more >
angular/angular - Gitter
If I subscribe to this I get the following error: ERROR TypeError: You provided 'undefined' where a stream was expected. You can provide...
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