2017-10-14 89 views
0

我有火灾“ng build - watch”命令。但是,只有一次构建。保存后不会继续建设。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

我发现这个问题...在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