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

前端 未结 1 378
执笔经年
执笔经年 2021-01-27 02:45

I am trying to generate a component called \"hero\" using \"ng generate component hero\" in the cmd line and am getting the following message:

Error: You

1条回答
  •  执笔经年
    2021-01-27 03:19

    for an hour was solving the same, eventually concluded:
    1. My global and local CLI mismatched (1.6.4 g vs 1.6.3 l), so I ran npm install --save-dev @angular/cli@latest
    2. After that that was another warning:
    "Error: More than one module matches. Use skip-import option to skip importing the component into the closest module. More than one module matches. Use skip-import option to skip importing the component into the closest module.",
    so ng g c my-component --skip-import now works as expected.
    I hope it will help.

    0 讨论(0)
提交回复
热议问题