【问题标题】:angular-cli: ng serve command with config errorangular-cli:带有配置错误的 ng serve 命令
【发布时间】:2017-02-28 23:35:16
【问题描述】:
Cannot read property 'config' of null
TypeError: Cannot read property 'config' of null
    at Class.run (C:\Users\me\AppData\Roaming\npm\node_module
    at checkExpressPort.then.then (C:\Users\goldneda\AppData\Roamin
    at process._tickCallback (internal/process/next_tick.js:103:7)

有人遇到同样的错误吗?我应该怎么办?我正在使用 angular-cli,但由于某种原因,事情停止了工作。

【问题讨论】:

标签: angular-cli


【解决方案1】:

我遇到了同样的错误,我是如何通过删除创建的应用程序文件夹并再次按照相同的过程生成应用程序来解决的,

  • 删除通过运行ng新创建的文件夹
  • npm 缓存清理
  • 新的
  • 光盘
  • ng 服务

【讨论】:

  • 在某些情况下,造成这种情况的原因是将您的应用程序移动到新目录,并且以句点开头的“隐藏文件”(例如 .angular-cli.json)没有被复制。要么创建新的“隐藏文件”,要么确保复制所需的所有内容。
猜你喜欢
  • 1970-01-01
  • 2021-08-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-12-30
  • 2017-12-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多