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.

(Bug) You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.

See original GitHub issue

Bug

You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.

NOTE See my repository (on the bottom of this post)

Expected Behavior

It should work as described in the docs

Current Behavior

It does not work.

Failure Information (for bugs)

 nx generate app                                                 
>  NX   NOTE  Nx didn't recognize the command, forwarding on to the Angular CLI.

? What name would you like for this app? app1
? What type of app would like to create? ionic           [Ionic app]
You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.

Steps to Reproduce

  1. npm create-xplat-workspace my-apps. Select empty workspace and Angular CLI.
  2. ng g @nstudio/xplat:init. Select arch: Ionic, Angular, prefix: ci
  3. nx generate app. Select name: app1, type: Ionic

Result: Error: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.

Context

  • NX Version 8.4.13
  • Xplat Version 8.0.6

A minimal reproduce scenario using allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.

Failure Logs

 nx generate app                                                 
>  NX   NOTE  Nx didn't recognize the command, forwarding on to the Angular CLI.

? What name would you like for this app? app1
? What type of app would like to create? ionic           [Ionic app]
You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.

Other

See my repository.

I wondering why this is not tested.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
erik-slackcommented, Oct 13, 2019

This was extremely helpful thanks all, especially @paullryan !

2reactions
paullryancommented, Sep 25, 2019

To anyone else that stumbles upon this (and @NathanWalker). Using ng does work but once you start you must continue to use ng (angular-cli) for all generation and init commands as mixing nx commands for generation will not properly tag angular.json and instead will try to populate the workspace.json which is what causes this error with nx 8.5.1+

so this will work on an existing nx project that is using angular-cli

ng add @nstudio/xplat
ng g @nstudio/xplat:init --prefix=cb --platforms=web,nativescript
ng generate @nstudio/xplat:app app
ng serve nativescript-app 
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 >
TypeError: You provided an invalid object where a ... - GitHub
TypeError : You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable. #2125.
Read more >
you provided an invalid object where a stream was expected ...
TypeError : You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
Read more >
Database error when activating phone : r/BoostMobile - Reddit
It says "You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable".
Read more >
TypeError: You provided an invalid object where a ... - SyntaxFix
TypeError : You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable. Home ·...
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