Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I've installed node from https://nodejs.org/en/download and then I installed angular CLI via NPM using

npm install -g @angular/cli

After it's done, I then try to create a new angular project

ng new new-project

And I get the following error

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

I've tried installing the cli using sudo (and without) and I've reinstalled node: I always get the same error.

I can't find anything about anyone having this issue.

I'm using MacOS.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
437 views
Welcome To Ask or Share your Answers For Others

1 Answer

Try to use an older version of Angular CLI until this problem get solved.

You can follow this issue in https://github.com/angular/angular-cli/issues/9172.

EDIT: I found a solution, run these commands:

npm un -g @angular/cli
npm cache clean --force
npm i -g @angular/cli

It worked for me.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...