milankinen / livereactload

Live code editing with Browserify and React
MIT License
865 stars 61 forks source link

'Upgrade Required'? #130

Closed cia48621793 closed 8 years ago

cia48621793 commented 8 years ago

I have the following Gulpfile (coffee):

b = watchify browserify
  cache: {}
  packageCache: {}
  entries: ['./src/cjsx/main.cjsx']
  extensions: ['.cjsx']
  debug: true
  transform: ['coffee-reactify', 'browserify-css']
  plugin: [lrload]

b.on 'update', -> gulp.start 'default'
b.on 'log', gutil.log

And the following output:

Steve@stevefan$ gulp
[21:10:53] Requiring external module coffee-script/register
[13:10:55.305] LiveReactload :: Reload server up and listening in port 4474...
[21:10:55] Using ~~REDACTED~~/Gulpfile.coffee
[21:10:55] Starting 'clean-dist'...
[21:10:55] Finished 'clean-dist' after 25 ms
[21:10:55] Starting 'clean'...
[21:10:55] Finished 'clean' after 34 μs
[21:10:55] Starting 'default'...
[21:11:02] 1657013 bytes written (6.80 seconds)

But when I access localhost:4474 it only prints a mere string on my browser, Chrome:

Upgrade Required

There is nothing in my Chrome devconsole. However, I did saw some error messages building native module(s) during the installation of LiveReactLoad:

14 errors generated.
make: *** [Release/obj.target/validation/src/validation.o] Error 1

I'm using a MacBook & macOS Sierra & Chrome 53 & LLVM 7.3.0 with XCode 7.3.1.


Speaking of 'Upgrade', there do have an 'upgrade' from HTTP request to WebSocket. Maybe that will be the problem? I'm not sure of that.

cia48621793 commented 8 years ago

I finally realised what's wrong, localhost:4474 was not a local server that serves HTML, but serves React component/state update.