最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - detect file changes in vagrant guest machine - Stack Overflow

programmeradmin2浏览0评论

I'm using Vagrant 1.8.4, running Ubuntu 14.04 box. I have installed node v6.2.2 and I'm running windows 10 x64-bit on the host machine, when I change js files and run gulp watch / babel script.js --watch --out-file piled.js The problem the changes are not detected by the guest machine.

I tried the following but no luck:

 config.vm.synced_folder ".", "/var/www",          
     :nfs => true,                                 
     :mount_options => ["dmode=777", "fmode=666", "lookupcache=none"]  

and this
     :mount_options => ["dmode=777", "fmode=666", "actimeo=1"] 

Please advice,

I'm using Vagrant 1.8.4, running Ubuntu 14.04 box. I have installed node v6.2.2 and I'm running windows 10 x64-bit on the host machine, when I change js files and run gulp watch / babel script.js --watch --out-file piled.js The problem the changes are not detected by the guest machine.

I tried the following but no luck:

 config.vm.synced_folder ".", "/var/www",          
     :nfs => true,                                 
     :mount_options => ["dmode=777", "fmode=666", "lookupcache=none"]  

and this
     :mount_options => ["dmode=777", "fmode=666", "actimeo=1"] 

Please advice,

Share Improve this question asked Jun 29, 2016 at 21:47 Ya BashaYa Basha 1,9527 gold badges32 silver badges56 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 7

So I was running into this same problem with Vagrant and an Angular 4 + Angular CLI project. While running the development server, file changes weren't triggering a rebuild of the files and a reload of the app. The issue is that file system events aren't forwarded to the Vagrant virtual machine. Installing the vagrant-notification-forwarder vagrant plugin solved the problem for me:

  • https://github./mhallin/vagrant-notify-forwarder

The above mentioned solution "vagrant-notify-forwarder" not reliable for me. Sometimes it doesn't work for mac.

"vagrant-fsnotify" plugin works for me.

Read here for configuration setup https://github./adrienkohlbecker/vagrant-fsnotify

发布评论

评论列表(0)

  1. 暂无评论