livereload doesn't trigger reload on change
Closed this issue · 10 comments
I've created a test case here: https://github.com/dotnetCarpenter/livereload-test
I run ecstatic as web server with root in root/
and livereload watching root/css/
To run the test case locally you can just clone the repo and do npm i
and then npm run testlivereload
. Open your browser at localhost:8000 and you should see a message in the console:
Starting LiveReload v0.4.0 for [...]/livereload-test/root/css on port 35729.
Browser connected.
Browser URL: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.8","snipver":"1"}
In the browser devtools I see that http://localhost:35729/livereload.js?snipver=1 is loaded but when I change the content in a.css
the page does not get reloaded.
As a side note, running livereload with livereload root/css -d -e css
fails with Unknown option: -e Try --help
. -e | --exts
is documented in the livereload README
I just ran the same test case with livereload version 0.3.7 and it worked perfectly. So it's a regression since 0.3.7.
Cloned your repository and followed your instructions. Worked just fine for me the first try.
Using OSX,10.10.5, Node 4.1.1
Cannot reproduce. Feel free to reopen if you can provide more information.
I ran into the same problem on Windows, and also ended up using 0.3.7.
Maybe it's only broken on Windows.
@ivw does utf-8-validate
successfully build during npm install
on Windows for you?
@ivw @dotnetCarpenter in version 0.4.0 we switched the file watcher to Chokidar https://github.com/paulmillr/chokidar so we could avoid interval-based polling. Chokidar is used by Gulp and other tools for file watching. Are there any more bits of info you can give me such as your version of Windows and version of Node that you're using?
@ivw actually you have to type npm run live
in one console and open another console and type npm run server
because running parallel tasks in the Windows console is not supported. I just tried on Windows 7 with livereload 0.3.7 and it worked in that order.
I then tried with livereload 0.4.0 but had issues with getting chokidar
's dependencies to build. But after reading a comment from MS about their new C++ build tool and installing Windows 8.1 SDK (even though I'm on Windows 7) I got things working with livereload 0.4.0.
@napcs In my case the issue is only happening on Mac (haven't tested linux though). I'm on Windows right now and it will take a few days before I'm on Mac again.
I just did a fresh npm install
with livereload 0.4.0 and now it works for me too. I didn't change anything else.
Maybe one of livereload's dependencies has updated which fixed it, I don't know what else it could have been :)
@dotnetCarpenter again, what version of OSX and what version of Node didn't work for you? This information would be helpful. If you're having problems, chances are that others are as well.
@napcs
OSX Yosemite 10.10.5
node -v v5.0.0
npm -v 3.3.9
livereload -v 0.4.0
xcode: Version 7.1.1 (7B1005)
Build output:
npm update livereload
> fsevents@1.0.5 install /Volumes/mystuff/dotnetCarpenter/Projects/playground/livereload-test/node_modules/fsevents
> node-pre-gyp install --fallback-to-build
[fsevents] Success: "/Volumes/mystuff/dotnetCarpenter/Projects/playground/livereload-test/node_modules/fsevents/lib/binding/Release/node-v47-darwin-x64/fse.node" is installed via remote
> bufferutil@1.2.1 install /Volumes/mystuff/dotnetCarpenter/Projects/playground/livereload-test/node_modules/bufferutil
> node-gyp rebuild
make: Entering directory '/Volumes/mystuff/dotnetCarpenter/Projects/playground/livereload-test/node_modules/bufferutil/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
make: Leaving directory '/Volumes/mystuff/dotnetCarpenter/Projects/playground/livereload-test/node_modules/bufferutil/build'
> utf-8-validate@1.2.1 install /Volumes/mystuff/dotnetCarpenter/Projects/playground/livereload-test/node_modules/utf-8-validate
> node-gyp rebuild
make: Entering directory '/Volumes/mystuff/dotnetCarpenter/Projects/playground/livereload-test/node_modules/utf-8-validate/build'
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
make: Leaving directory '/Volumes/mystuff/dotnetCarpenter/Projects/playground/livereload-test/node_modules/utf-8-validate/build'
- commander@0.6.1 node_modules/commander
- debug@2.2.0 node_modules/debug
- ms@0.7.1 node_modules/ms
- tinycolor@0.0.1 node_modules/tinycolor
- websocket.io@0.2.1 node_modules/websocket.io
- ws@0.4.20 node_modules/ws
livereload-test@1.0.0 /Volumes/mystuff/dotnetCarpenter/Projects/playground/livereload-test
└── livereload@0.4.0