Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

No livereload with directory start #155

Closed
gabrielstuff opened this issue Apr 30, 2016 · 7 comments
Closed

No livereload with directory start #155

gabrielstuff opened this issue Apr 30, 2016 · 7 comments

Comments

@gabrielstuff
Copy link

gabrielstuff commented Apr 30, 2016

Version : "budo": "8.2.2"
Chrome 50.0.2661.86
Env: Electron: v0.37.7 - node v5.10.0

I'm using Budo with its API.

I'm running :

budo('', {
        live: true, // setup live reload
        dir: path
      }).on('connect', function(ev) {
        console.log('Server running on %s', ev.uri)
        console.log('LiveReload running on port %s', ev.livePort)
        window.webContents.send('server-started', {url: ev.uri, name: path, checked:true})
      }).on('update', function(buffer) {
        console.log('bundle - %d bytes', buffer.length)
      })

Path is a directory. Budo serve everything correctly. Unfortunately altering the .html or .css file does not seems to reload the content. I have to manually reload the page.

Running budo from command line : budo --live --dir=MYPATH works perfectly.

@mattdesl
Copy link
Owner

mattdesl commented May 1, 2016

I just tried and things seem fine here. Can you put together a test case so that I can reproduce the issue? Thanks. 😄

@gabrielstuff
Copy link
Author

Well, it must be something with my computer :(
Just tried the budo command line I posted and it doesn't work anymore : budo --live --livePort=34543 or budo --dir=. --live or budo --dir=MYPATH --live
The example is as it :

'use strict'

const budo = require('budo')
let path = 'pathgoehere'

budo('', {
  live: true, 
  dir: path
}).on('connect', function (ev) {
  console.log('Server running on %s', ev.uri)
  console.log('LiveReload running on port %s', ev.livePort)
}).on('update', function (buffer) {
  console.log('bundle - %d bytes', buffer.length)
})

@perguth
Copy link

perguth commented May 11, 2016

I just ran into the same problem:

# node: v5.9.0 (npm v3.7.3)
> budo --live --dir=. --debug --host localhost index.js:bundle.js

[0000] info  Server running at http://localhost:9966/ (connect)
[0000] info  LiveReload running on 35729
[0001] 58ms       1610B (browserify)
[0005] 7ms        1610B GET    200 /bundle.js
# Meanwhile `/bundle.js` got altered.
[0011] 3ms        1610B GET    200 /bundle.js
[0012] 1ms        1610B GET    200 /bundle.js

With and without dir it does not re-generate the bundle.js but just delivers the result of the initial compilation 😿.

I also tried deleting all packages upgrading to node: v6.1.0 (npm v3.8.6) and reinstalling.

Back to wzrd and manual reload for now...

@mattdesl
Copy link
Owner

Sorry, your message slipped through the cracks of my email it seems.

Can you let me know what OS you are using? I'm using the same command on the same node/npm versions and I can't reproduce any problems. I'm on OSX 10.11.4.

@perguth
Copy link

perguth commented Jun 17, 2016

Np, thanks @mattdesl. I am on: OSX 10.11.5

@mattdesl
Copy link
Owner

For those experiencing LiveReload issues, you can try the WIP branch here which replaces tiny-lr with a custom WebSocket backend:

#194 (comment)

@mattdesl
Copy link
Owner

Should probably be fixed with latest 10.x release. Please open a new issue if there's any more LiveReload bugs.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants