Angular CLI ng新错误 [英] Angular CLI ng new error

查看:126
本文介绍了Angular CLI ng新错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从 https://nodejs.org/en/download 安装了节点,然后我通过NPM使用

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

然后出现以下错误

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.

我尝试使用sudo(和不使用sudo)安装cli,并重新安装了node:我总是遇到相同的错误.

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.

我正在使用MacOS.

I'm using MacOS.

推荐答案

我按照步骤

  • 更新节点,npm最新版本
  • 删除angular-cli 1.6.3
  • 安装angular-cli 1.5

我可以创建应用程序,组件和其他

I could create application, component and others

更新1月12日

我将angular-cli升级为1.6.4,将节点升级为9.4.0,并为我创建新项目做得很好

I update angular-cli up 1.6.4, Node up 9.4.0 and worked fine for me to create new project

这篇关于Angular CLI ng新错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆