jaxbot / browserlink.vim

Live browser editing for Vim
MIT License
711 stars 38 forks source link

No live update, most likely due to a Node problem #43

Closed RomainEndelin closed 8 years ago

RomainEndelin commented 8 years ago

Hi, and thanks for the great work!

However, I can't get BrowserLink to update my page. I see no error message from Vim, and I've tried both the <script> and with GreaseMonkey.

It seems that socket.js is not running when I edit an HTML file (ps aux| grep node doesn't return anything relevant). When I try to run node socket.js manually, I get the following error:

/home/kilik/persistent/dotfiles/nvim/plugged/browserlink.vim/browserlink/js/socket.js:10
    var socket = new WebSocket("ws://127.0.0.1:9001/");
                     ^

ReferenceError: WebSocket is not defined
    at /home/kilik/persistent/dotfiles/nvim/plugged/browserlink.vim/browserlink/js/socket.js:10:19
    at Object.<anonymous> (/home/kilik/persistent/dotfiles/nvim/plugged/browserlink.vim/browserlink/js/socket.js:127:3)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3

FYI, I am using Node v4.4.1 (using NVM), which I have installed recently (i.e., it probably doesn't have many packages installed globally). I am also using Neovim, with python 2.7 support.

Thanks.

RomainEndelin commented 8 years ago

Oh, my bad, sorry... I just realize it works when running node browserlink.js :sweat: .

Still, the node server doesn't seem to run automatically, so I'm opening a well-defined issue about it.