Angular2 CLI "ng serve" 无法在 windows 上运行

Angular2 CLI "ng serve" not working on windows

在我的 windows cmd 上尝试 运行 "ng serve" 时,出现以下错误:

WebpackOptionsValidationError:无效的配置对象。 Webpack 已经在 使用与 API 架构不匹配的配置对象进行初始化。 - 配置有一个未知 属性 'tslint'。这些属性是有效的: object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, 条目,外部?,加载器?,模块?,名称?,节点?,输出?,插件?,配置文件?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, s tats?, target?, watch?, watchOptions? } 对于错别字:请更正。 对于加载器选项:webpack 2 不再允许在 configura 中自定义属性 化。 加载程序应该更新以允许通过 mo 中的加载程序选项传递选项 dule.rules。 在加载程序更新之前,可以使用 LoaderOptionsPlugin 来传递这些 加载程序的选项:

PS:我正在关注 https://github.com/angular/angularfire2/blob/master/docs/1-install-and-setup.md 安装和设置 AngularFire2。

在收到此错误之前,我做了:

  1. npm install -g angular-cli
  2. npm install -g typings
  3. npm install -g typescript
  4. ng 新的 oct25
  5. cd oct25
  6. ng serve //这是我收到错误的地方

尝试删除 node_modules 文件夹并重新安装 npm。成功了..!!