我有一个Windows 10主机和一个运行在Vagrant虚拟机下的Ubuntu 14.04 LTS系统。我需要在共享文件夹中使用符号链接权限。
config.vm.synced_folder "project_folder", "/home/vagrant/ngbox_project", type: "smb", mount_options: ["vers=3.02","mfsymlinks"]
已安装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上通过共享文件夹运行 ng serve 时无法监视文件更改以外,一切都正常。如果在 Ubuntu 上进行更改,则 serve watch 可以工作。同样地,build --watch eth也无法工作。
当我使用手动安装而非 ng-cli 安装的 webpack-dev-server(angular2 + webpack)时,在两个系统中 watch 正常工作。
尝试执行 sudo sysctl fs.inotify.max_user_watches=524288
没有帮助我解决问题。
P.S. 我尝试过重新安装 npm、ng-cli 并清除缓存。共享文件夹路径没有空格。