在无业游民的Windows主机下,Angular-Cli发球手表无法正常工作 [英] Angular-cli serve watch not work under vagrant windows host

查看:71
本文介绍了在无业游民的Windows主机下,Angular-Cli发球手表无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在无业游民框下有Windows 10主机和Ubuntu 14.04 LTS.具有符号链接权限的共享文件夹

I have windows 10 host and Ubuntu 14.04 LTS under vagrant box. Shared folder with symlink permissions

config.vm.synced_folder "project_folder", "/home/vagrant/ngbox_project", type: "smb", mount_options: ["vers=3.02","mfsymlinks"]

已安装npm,angular-cli

Installed npm, angular-cli

npm 4.0.5

angular-cli: 1.0.0-beta.24
node: 4.7.0
os: linux x64
@angular/common: 2.4.1
@angular/compiler: 2.4.1
@angular/core: 2.4.1
@angular/forms: 2.4.1
@angular/http: 2.4.1
@angular/platform-browser: 2.4.1
@angular/platform-browser-dynamic: 2.4.1
@angular/router: 3.4.1
@angular/compiler-cli: 2.4.1

一切正常,但不能监视Windows上的文件更改(通过共享文件夹).如果在Ubuntu上进行更改,则可以监视工作. Соответственно也无法正常工作--watch eth

Everything worked fine axcept ng serve not watch file changed at windows (via shared folder). If changes make at Ubuntu serve watch work. Соответственно Also not work build --watch eth

当我使用不是从ng-cli手动安装的webpack-dev-server(angular2 + webpack)-在两个系统中都可以正常工作

When i used webpack-dev-server (angular2 + webpack) installed manually not from ng-cli - watch work normally in both systems

尝试sudo sysctl fs.inotify.max_user_watches=524288并没有帮助我.

P.S.我尝试重新安装npm,ng-cli,并删除了缓存.共享文件夹路径中没有空格.

P.S. I tryed to reinstall npm, ng-cli with cache remove. Shared folder path has not spaces.

推荐答案

编辑:Rsync仅允许单向同步(请参见

Edit: Rsync only allows one-way synchronization (see https://github.com/mitchellh/vagrant/issues/3062). So it is no good for working with angular-cli. Pardon me. Below you find a solution that should work.

使用流浪汉插件 fsnotify .它会监视主机上的更改,并在访客上重复这些更改.

Use the vagrant plugin fsnotify. It watches for changes on your host and repeats them on the guest.

  • Rsync类型(针对流浪汉中的共享文件夹)
    • 仅单向同步
    • Rsync type for shared folders in vagrant
      • only one-way-synchronization
      • 对我来说根本无法安装

      这篇关于在无业游民的Windows主机下,Angular-Cli发球手表无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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