bracey.vim
bracey.vim copied to clipboard
bracey error: <urlopen error [Errno 111] Connection refused>
I am getting the Errno 111 error. It starts the server, launches page in browser then server closes or something.
Not all the time but from time to time.
Edit: Also when I change buffers, it shows Connection refused error.
I have the same problem, always that i run Bracey i got the same problem.
First of all, check if you have performed all the installation correctly. If not then do it and perform below steps accordingly. It is also shown in the installation steps in the README file.
Change into the plugins installation directory. This is different for every plugin manager but should be something like
1. cd ~/.vim/bundle/bracey.vim for pathogen/neoBundle/vundle
cd ~/.vim/plugged/bracey.vim for plug
2. run npm install --prefix server
@palhiman: Nop, I tried that. I didn't work.
I did the following tests:
- created a
htmlfile with a h1, and an emptycssfile. - it fails when you try to open thecssfile. - Same
htmlwith some styles in thecssfile. It works. - Same
htmlwith custom properties--some-property. - it fails when you try to open thecssfile.
I hope this helps narrowing down the bug. I really like this plugin.
Bracey only works with html file because server usually responses all other files such as css, php using html. Include the css file into html using link tag and run Bracey while u are on html file. Try this if nothing happens please let me know....
On Thu, Apr 16, 2020 at 7:03 PM Carlos Nucette [email protected] wrote:
I did the following tests:
- created a html file with a h1, and an empty css file. - it fails when you try to open the css file.
- Same html with some styles in the cssfile. It works.
- Same html with custom properties --some-property. - it fails when you try to open the css file.
I hope this helps narrowing down the bug. I really like this plugin.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/turbio/bracey.vim/issues/21#issuecomment-614655774, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTOHWXVOP4FNYN3IVTJHV3RM4CL3ANCNFSM4LMAGH5A .
@palhiman I didn't say that the html was already opened when I did this tests. Sorry, my bad. I launch vim like this vim index.html and then I tried to open the css file using both :e and gfif it matters.
I got your point. what you are doing is that after :e style.css (let's assume) which opens empty css file. Now what happens is that when you don't write something and exit it without :w then what is does is it doesn't save it and when you do :w you will get an empty css file. Try this and let me know...
On Thu, Apr 16, 2020 at 7:53 PM Carlos Nucette [email protected] wrote:
@palhiman https://github.com/palhiman I didn't say that the html was already opened when I did this tests. Sorry, my bad. I launch vim like this vim index.html and then I tried to open the css file using both :e and gfif it matters.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/turbio/bracey.vim/issues/21#issuecomment-614685410, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTOHWRG3JISCEVIISGZTO3RM4IHPANCNFSM4LMAGH5A .
Ok, So I deleted the styles.css file, open index.html, which has a link to styles.css, and run :Bracey. Then I open a new file with :e styles.css, and immediately get the error. Close without saving. I repeat the same steps but saving the file this time and open it. Again I get an error. Finally I put some rules, save, close, and open the file, and now it works. So if the file doesn't exists, or if the file is empty, or if the file has custom properties, bracey errors.
Did you have npm installed. If not then do install it. Let me
know...after that...
On Thu, Apr 16, 2020 at 9:42 PM Carlos Nucette [email protected] wrote:
Ok, So I deleted the styles.css file, open index.html, which has a link to styles.css, and run :Bracey. Then I open a new file with :e styles.css, and immediately get the error. Close without saving. I repeat the same steps but saving the file this time and open it. Again I get an error. Finally I put some rules, save, close, and open the file, and now it works. So if the file doesn't exists, or if the file is empty, or if the file has custom properties, bracey errors.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/turbio/bracey.vim/issues/21#issuecomment-614748755, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTOHWSJD5GH2VS4VJP65MDRM4U6XANCNFSM4LMAGH5A .
Yes, it is installed. Do you think there is some problem on my end? Don't You have this issue? I'm going to try with a minimal vimrc to check.
Ok, I used the following vimrc, and I'm still getting the same error.
set runtimepath^=~/.config/nvim/plugged/bracey.vim
set runtimepath^=~/.config/nvim/plugged/onedark
filetype plugin indent on
syntax on
set hidden
I believe this is a bug in the Bracey server. When it encounters a document it can't parse it'll often crash. You should be able to get crash logs from /tmp/bracey_server_logfile to help debug why this is happening.
@turbio hi, in my case when it crashes that file only shows the following:
starting bracey with arguments:
port: 5000
web-address: 127.0.0.1
editor-address: 127.0.0.1
It did this with both files opened (index.html, style.css) and linked, and the active buffer is the one with index.html.
Hi @cjnucette , i had the same problem, i use the "nerdtree" and when i change the buffer i get this error. But what i did to solve it was:
- Enter in the nerdtree buffer and start Bracey ;
- In the URL put /name-of-your-html-file (for example http://127.0.0.1:29756/create-point.html). i hope this will solve your problem. (sorry about the english, i'm Brazilian)
I had this issue when I installed Bracey with VimPlug because I didn't read the part where it says I had to manually install the dependencies so in my case I have Neovim and the bracey plug is installed at ~/.local/share/nvim/plugs/bracey.vim/ once here I proceeded to run "npm install --prefix server" and wallah it started working as it should and haven't had any issues after.
I had this issue when I installed Bracey with VimPlug because I didn't read the part where it says I had to manually install the dependencies so in my case I have Neovim and the bracey plug is installed at ~/.local/share/nvim/plugs/bracey.vim/ once here I proceeded to run "npm install --prefix server" and wallah it started working as it should and haven't had any issues after.
Thank you @tonyjim02 this worked really well with me
In my case when I had that problem what I did: before starting the server I write a basic structure of html and in the css I write something basic, save and then start. excuse my writing.
I had this issue when I installed Bracey with VimPlug because I didn't read the part where it says I had to manually install the dependencies so in my case I have Neovim and the bracey plug is installed at ~/.local/share/nvim/plugs/bracey.vim/ once here I proceeded to run "npm install --prefix server" and wallah it started working as it should and haven't had any issues after.
Thank you, this works very well :+1:
Here another one suffering from this bug. My vim is quite pristine still. Could anyone tell me how to start debugging this? I did correctly follow the installation steps, am not using neovim bbut vim, and am not using nerdtree or anything else (only tried vim-instant-markdown, and tried to disable that, but to no avail). error message in vim itself (random ports leave me with a 'Ranggerror: Maximum call stack size exceeded':
starting server with args "['node', 'launch.js', '--port', '0']" bracey error: <urlopen error [Errno 111] Connection refused> bracey error: <urlopen error [Errno 111] Connection refused> Press ENTER or type command to continue
log:
starting bracey with arguments: port: 27286 web-address: 127.0.0.1 editor-address: 127.0.0.1 /home/ashwin/.vim/bundle/bracey.vim/server/server.js:87 var commandArgs = [commandData]; ^
RangeError: Maximum call stack size exceeded at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:87:20) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) starting bracey with arguments: port: 35129 web-address: 127.0.0.1 editor-address: 127.0.0.1 /home/ashwin/.vim/bundle/bracey.vim/server/server.js:87 var commandArgs = [commandData]; ^
RangeError: Maximum call stack size exceeded at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:87:20) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) starting bracey with arguments: port: 35129 web-address: 127.0.0.1 editor-address: 127.0.0.1 /home/ashwin/.vim/bundle/bracey.vim/server/server.js:87 var commandArgs = [commandData]; ^
RangeError: Maximum call stack size exceeded at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:87:20) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) starting bracey with arguments: port: 43812 web-address: 127.0.0.1 editor-address: 127.0.0.1 /home/ashwin/.vim/bundle/bracey.vim/server/server.js:87 var commandArgs = [commandData]; ^
RangeError: Maximum call stack size exceeded at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:87:20) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) starting bracey with arguments: port: 0 web-address: 127.0.0.1 editor-address: 127.0.0.1 starting bracey with arguments: port: 1222 web-address: 127.0.0.1 editor-address: 127.0.0.1 /home/ashwin/.vim/bundle/bracey.vim/server/server.js:87 var commandArgs = [commandData]; ^
RangeError: Maximum call stack size exceeded at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:87:20) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) starting bracey with arguments: port: 1222 web-address: 127.0.0.1 editor-address: 127.0.0.1 /home/ashwin/.vim/bundle/bracey.vim/server/server.js:87 var commandArgs = [commandData]; ^
RangeError: Maximum call stack size exceeded at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:87:20) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) starting bracey with arguments: port: 1222 web-address: 127.0.0.1 editor-address: 127.0.0.1 /home/ashwin/.vim/bundle/bracey.vim/server/server.js:87 var commandArgs = [commandData]; ^
RangeError: Maximum call stack size exceeded at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:87:20) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) starting bracey with arguments: port: 467 web-address: 127.0.0.1 editor-address: 127.0.0.1 events.js:292 throw er; // Unhandled 'error' event ^
Error: listen EACCES: permission denied 127.0.0.1:467 at Server.setupListenHandle [as _listen2] (net.js:1301:21) at listenInCluster (net.js:1366:12) at doListen (net.js:1503:7) at processTicksAndRejections (internal/process/task_queues.js:81:21) Emitted 'error' event on Server instance at: at emitErrorNT (net.js:1345:8) at processTicksAndRejections (internal/process/task_queues.js:80:21) { code: 'EACCES', errno: -13, syscall: 'listen', address: '127.0.0.1', port: 467 } starting bracey with arguments: port: 467 web-address: 127.0.0.1 editor-address: 127.0.0.1 events.js:292 throw er; // Unhandled 'error' event ^
Error: listen EACCES: permission denied 127.0.0.1:467 at Server.setupListenHandle [as _listen2] (net.js:1301:21) at listenInCluster (net.js:1366:12) at doListen (net.js:1503:7) at processTicksAndRejections (internal/process/task_queues.js:81:21) Emitted 'error' event on Server instance at: at emitErrorNT (net.js:1345:8) at processTicksAndRejections (internal/process/task_queues.js:80:21) { code: 'EACCES', errno: -13, syscall: 'listen', address: '127.0.0.1', port: 467 } starting bracey with arguments: port: 467 web-address: 127.0.0.1 editor-address: 127.0.0.1 events.js:292 throw er; // Unhandled 'error' event ^
Error: listen EACCES: permission denied 127.0.0.1:467 at Server.setupListenHandle [as _listen2] (net.js:1301:21) at listenInCluster (net.js:1366:12) at doListen (net.js:1503:7) at processTicksAndRejections (internal/process/task_queues.js:81:21) Emitted 'error' event on Server instance at: at emitErrorNT (net.js:1345:8) at processTicksAndRejections (internal/process/task_queues.js:80:21) { code: 'EACCES', errno: -13, syscall: 'listen', address: '127.0.0.1', port: 467 } starting bracey with arguments: port: 0 web-address: 127.0.0.1 editor-address: 127.0.0.1
OK,it works,I'm so stupid boy. i think yarn will be ok, but it doesn' t.
@allinu Your comment is completely useless.
I also find it problematic that Bracey has no tags and no past versions available in order to resort to them. So if the development version is buggy, we can't use the software...
In my case I obsoleted this bug by adding this (officialy documented) line in my nvim configuration file:
g:bracey_server_allow_remote_connections
Note: Sometimes it happens that I have to run :Bracey twice in order to open the web page preview. 1st time it fails.
@71GA OK,but it's ok for me,sorry cant help you
I have the same problem as @SleepyMario met, when I start the server in a directory which includes non ascii charactors.
Here another one suffering from this bug. My vim is quite pristine still. Could anyone tell me how to start debugging this? I did correctly follow the installation steps, am not using neovim bbut vim, and am not using nerdtree or anything else (only tried vim-instant-markdown, and tried to disable that, but to no avail). error message in vim itself (random ports leave me with a 'Ranggerror: Maximum call stack size exceeded':
starting server with args "['node', 'launch.js', '--port', '0']" bracey error: <urlopen error [Errno 111] Connection refused> bracey error: <urlopen error [Errno 111] Connection refused> Press ENTER or type command to continue
log:
starting bracey with arguments: port: 27286 web-address: 127.0.0.1 editor-address: 127.0.0.1 /home/ashwin/.vim/bundle/bracey.vim/server/server.js:87 var commandArgs = [commandData]; ^
RangeError: Maximum call stack size exceeded at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:87:20) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8) at Server.parseEditorRequest (/home/ashwin/.vim/bundle/bracey.vim/server/server.js:102:8)
Hi everyone!
I just installed Bracey and I'm getting this error. I added the {'do': 'npm install --prefix server'} after my Plug line Plug 'turbio/bracey.vim'. Then I tried installing manually the npm dependencies by going to ~/.vim/plugged/bracey.vim and running npm install --prefix server but I got the same result. Has anyone figured out this bug?
Edit: I don't know if this could help but I'll let you guys know about this:
When I first execute :Bracey, it opens the browser and says that connection was refused by server. But then I reload that same page and it displays a text saying: "wait for a while... Vim hasn't opened an html file yet, or at least bracey isn't aware of any". That makes me think that the server is working but bracey is not aware of the buffers opened at that moment. Also I tried changing the url by writing my file name through it: http://127.0.0.1/filename.html and this returns the following output (by the bracey server): "file could not be read. Error: ENOENT: no such file or directory, open 'undefined/filename.html'". The path that is trying to find is undefined/filename.html. I hope this could help someway
Hello,
I recently experienced this aswell, and I wanted to share my experience.. maybe this could be to any help for someone (hopefully). It seems to be different for everyone.
Long version:
What happens if you guys just swap out default local ip (127.0.0.1) with just typing localhost in your browser after Bracey started? and then just keep the portnumber that Bracey starts the server from.
NOTE! this will only work after u get rid of the error by running npm install --prefix server in your plugin directory where bracey is installed. For me the error dissapeared but I was redirected to an ip that was still giving me 404 page not found.
The whole {'do': 'npm install --prefix server'} when installing the plugin did not work for me at all. It seems better to run npm install --prefix server in the directory where the plugin is installed instead. This is confirmed by others too get rid of the error, most of the time, so don't completely rely on that.
So for example I see that Bracey starts the server at 127.0.0.1:34003 (port number is always random as stated in the README). Simply try to replace 127.0.0.1 with localhost, in other words: localhost:34003 or http://localhost:34003
To get this to work I did the following (using lua config, but should work similarly for vimscript aswell)
- First install npm install --prefix server in your plugin directory where bracey is installed, forexample it could be: ~/.vim/bundle/bracey.vim or if using neovim it should be somewhere in ~/.local/share/nvim/site , then it depends on what plugin manager you are using.
For me, using packer.nvim since I've configured my nvim in lua, it's cd ~/.local/share/nvim/site/pack/packer/start/bracey.vim With this your error bracey error: <urlopen error [Errno 111] Connection refused> should be gone atleast. But you might experience that you are still getting a 404 page not found. First try to change the ipadress to localhost:portnumber that is given from Bracey when starting it via :Bracey
Short version:
The command I ran was:
cd ~/.local/share/nvim/site/pack/packer/start/bracey.vim
&& npm install --prefix server
After that I put this into my nvim config file (mine is called plugins.lua):
- vim.g['bracey_server_allow_remote_connections'] = 1 ( same as setting g:bracey_server_allow_remote_connections = 1 in vimscript in your .vimrc or init.vim, whatever you are using )
- vim.g['bracey_server_path'] = 'http://localhost' ( same as setting g:bracey_server_path = 'http://localhost' in your .vimrc or init.vim, whatever you are using )
You can also try to set:
- vim.g['bracey_auto_start_browser'] = 0 as this seems to have work for someone above.. ( same as setting g:bracey_auto_start_browser = 0 in vimscript in your .vimrc or init.vim, whatever you are using )
This is the solution that worked for me atleast. I'm on WSL though. Hope it helps someone, as Bracey is simply amazing!
I had this issue when I installed Bracey with VimPlug because I didn't read the part where it says I had to manually install the dependencies so in my case I have Neovim and the bracey plug is installed at ~/.local/share/nvim/plugs/bracey.vim/ once here I proceeded to run "npm install --prefix server" and wallah it started working as it should and haven't had any issues after.
Thank you man, its worked on me
Hello,
I recently experienced this aswell, and I wanted to share my experience.. maybe this could be to any help for someone (hopefully). It seems to be different for everyone.
Long version:
What happens if you guys just swap out default local ip (127.0.0.1) with just typing localhost in your browser after Bracey started? and then just keep the portnumber that Bracey starts the server from.
NOTE! this will only work after u get rid of the error by running npm install --prefix server in your plugin directory where bracey is installed. For me the error dissapeared but I was redirected to an ip that was still giving me 404 page not found.
The whole {'do': 'npm install --prefix server'} when installing the plugin did not work for me at all. It seems better to run npm install --prefix server in the directory where the plugin is installed instead. This is confirmed by others too get rid of the error, most of the time, so don't completely rely on that.
So for example I see that Bracey starts the server at 127.0.0.1:34003 (port number is always random as stated in the README). Simply try to replace 127.0.0.1 with localhost, in other words: localhost:34003 or http://localhost:34003
To get this to work I did the following (using lua config, but should work similarly for vimscript aswell)
* First install npm install --prefix server in your plugin directory where bracey is installed, forexample it could be: ~/.vim/bundle/bracey.vim or if using neovim it should be somewhere in ~/.local/share/nvim/site , then it depends on what plugin manager you are using.For me, using packer.nvim since I've configured my nvim in lua, it's cd ~/.local/share/nvim/site/pack/packer/start/bracey.vim With this your error bracey error: <urlopen error [Errno 111] Connection refused> should be gone atleast. But you might experience that you are still getting a 404 page not found. First try to change the ipadress to localhost:portnumber that is given from Bracey when starting it via :Bracey
Short version:
The command I ran was:
cd ~/.local/share/nvim/site/pack/packer/start/bracey.vim && npm install --prefix server
After that I put this into my nvim config file (mine is called plugins.lua):
* vim.g['bracey_server_allow_remote_connections'] = 1 ( same as setting g:bracey_server_allow_remote_connections = 1 in vimscript in your .vimrc or init.vim, whatever you are using ) * vim.g['bracey_server_path'] = 'http://localhost' ( same as setting g:bracey_server_path = 'http://localhost' in your .vimrc or init.vim, whatever you are using )You can also try to set:
* vim.g['bracey_auto_start_browser'] = 0 as this seems to have work for someone above.. ( same as setting g:bracey_auto_start_browser = 0 in vimscript in your .vimrc or init.vim, whatever you are using )This is the solution that worked for me atleast. I'm on WSL though. Hope it helps someone, as Bracey is simply amazing!
People like you make me smile, you really took the time to write that and it helped me, thank you.
Can someone help me, this is my log:( I already use 'npm install --prefix server'
`Node.js v17.9.0 starting bracey with arguments: port: 15868 web-address: 127.0.0.1 editor-address: 127.0.0.1 /home/whiteburst/.config/nvim/plugged/bracey.vim/server/htmlfile.js:4 var htmlhint = new HTMLHintClass; ^
TypeError: HTMLHintClass is not a constructor
at Object.
Node.js v17.9.0`
I delete Plug 'turbio/bracey.vim' make a Plug clean And reinstall whit Plug 'turbio/bracey.vim', {'do': 'npm install --prefix server'} And it's work for me I didn't read about javascript dependencies
Hello, I recently experienced this aswell, and I wanted to share my experience.. maybe this could be to any help for someone (hopefully). It seems to be different for everyone. Long version: What happens if you guys just swap out default local ip (127.0.0.1) with just typing localhost in your browser after Bracey started? and then just keep the portnumber that Bracey starts the server from. NOTE! this will only work after u get rid of the error by running npm install --prefix server in your plugin directory where bracey is installed. For me the error dissapeared but I was redirected to an ip that was still giving me 404 page not found. The whole {'do': 'npm install --prefix server'} when installing the plugin did not work for me at all. It seems better to run npm install --prefix server in the directory where the plugin is installed instead. This is confirmed by others too get rid of the error, most of the time, so don't completely rely on that. So for example I see that Bracey starts the server at 127.0.0.1:34003 (port number is always random as stated in the README). Simply try to replace 127.0.0.1 with localhost, in other words: localhost:34003 or http://localhost:34003 To get this to work I did the following (using lua config, but should work similarly for vimscript aswell)
* First install npm install --prefix server in your plugin directory where bracey is installed, forexample it could be: ~/.vim/bundle/bracey.vim or if using neovim it should be somewhere in ~/.local/share/nvim/site , then it depends on what plugin manager you are using.For me, using packer.nvim since I've configured my nvim in lua, it's cd ~/.local/share/nvim/site/pack/packer/start/bracey.vim With this your error bracey error: <urlopen error [Errno 111] Connection refused> should be gone atleast. But you might experience that you are still getting a 404 page not found. First try to change the ipadress to localhost:portnumber that is given from Bracey when starting it via :Bracey Short version: The command I ran was: cd ~/.local/share/nvim/site/pack/packer/start/bracey.vim && npm install --prefix server After that I put this into my nvim config file (mine is called plugins.lua):
* vim.g['bracey_server_allow_remote_connections'] = 1 ( same as setting g:bracey_server_allow_remote_connections = 1 in vimscript in your .vimrc or init.vim, whatever you are using ) * vim.g['bracey_server_path'] = 'http://localhost' ( same as setting g:bracey_server_path = 'http://localhost' in your .vimrc or init.vim, whatever you are using )You can also try to set:
* vim.g['bracey_auto_start_browser'] = 0 as this seems to have work for someone above.. ( same as setting g:bracey_auto_start_browser = 0 in vimscript in your .vimrc or init.vim, whatever you are using )This is the solution that worked for me atleast. I'm on WSL though. Hope it helps someone, as Bracey is simply amazing!
People like you make me smile, you really took the time to write that and it helped me, thank you.
Damn I feel like I am so close but still not getting it to work.
➜ cd ~/.local/share/nvim/site/pack/packer/start/bracey.vim && npm install --prefix server
up to date, audited 255 packages in 868ms
29 packages are looking for funding
run `npm fund` for details
17 vulnerabilities (4 moderate, 11 high, 2 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.