jaxbot / browserlink.vim

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

Error when saving a css file #4

Closed inside closed 11 years ago

inside commented 11 years ago

This is the error message I got when saving a css file:

"css/views/shared/header.css" 662L, 15477C écrit(s) Erreur détectée en traitant function 54_ReloadCSS : ligne 1 : Traceback (most recent call last): File "", line 1, in File "/home/inside/github/dotfiles/.vim/bundle/brolink.vim/plugin/websocket_cl ient-0.11.0-py2.7.egg/websocket.py", line 741, in send AttributeError: 'NoneType' object has no attribute 'send'

Can you tell me more about it?

Thank you.

jaxbot commented 11 years ago

Is the Node server running? For this to work, you have to have Brolink.js running in the background.

inside commented 11 years ago

The node server is running:

% node brolink.js 
Brolink
Server version: 2.0.0
======================
Dedicated to everyone who missed the first chest in OOT's Forest Temple

Warning: Native modules not compiled.  XOR performance will be degraded.
Warning: Native modules not compiled.  UTF-8 validation disabled.
Server listening on port 9001

Maybe I have a too old version of node.js:

% node --version
v0.8.19
jaxbot commented 11 years ago

If a websocket connection can be made to 127.0.0.1:9001, then everything should be good.

I don't know of any reason why it wouldn't work in 0.8, but who knows. You can try opening up Chromium or the firefox console and running

var socket = new WebSocket("ws://127.0.0.1:9001/"); socket.onopen = socket.onclose = socket.onmessage = socket.onerror = function(evt) { console.log(evt); };

and see what the outcome of that is

inside commented 11 years ago

I know what's going on, it's on my side. We use vservers and they don't listen on localhost but on their ip. I've hardcoded my vserver's ip in brolink.vim and it's working fine. Great plugin.

Regards, Yann

jaxbot commented 11 years ago

Ah, makes sense then. You can actually set in override in your vimrc, but that works too