ng build - 监视重建过程

时间:2017-10-14 06:33:15

标签: angular angular-cli

我有火" ng build --watch "命令。但是,只有一次构建。保存后不建立继续。

我的版本详细信息:

_                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.4.7
node: 6.10.3
os: linux x64
@angular/animations: 4.4.5
@angular/common: 4.4.5
@angular/compiler: 4.4.5
@angular/compiler-cli: 4.4.5
@angular/core: 4.4.5
@angular/forms: 4.4.5
@angular/http: 4.4.5
@angular/platform-browser: 4.4.5
@angular/platform-browser-dynamic: 4.4.5
@angular/platform-server: 4.4.5
@angular/router: 4.4.5
@angular/cli: 1.4.7
@angular/language-service: 4.4.5
typescript: 2.5.3

1 个答案:

答案 0 :(得分:1)

我发现了这个问题......在Linux中发现了这个问题

在我身边,我发现了问题:检测到更改的系统(inotify)默认情况下无法处理这么多手表。 要更改它可以处理的监视数量(=将在项目中的最大文件数量),您必须运行此命令:

echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches

每次重新启动计算机时,inotify的问题都会重置此计数器。 在之前的版本中,有一个警告告诉整个项目无法被观察到。所以我们知道我们必须运行这个命令。事实并非如此。 应该做某事,某种程度上,某些地方,以便这个文件检测始终在Linux上开箱即用。

更多详情:https://github.com/angular/angular-cli/issues/2389#issuecomment-250964095