live-server.nvim icon indicating copy to clipboard operation
live-server.nvim copied to clipboard

Live Server Won't Start On Windows

Open Spelis123 opened this issue 2 years ago • 10 comments

after installing npm/node and restarting my Windows 11 PC and running :LiveServer it wont start. it says its started but when i manually go to firefox and enter 127.0.0.1 or localhost it fails to load the page.

NOTE: This post has been edited.

Spelis123 avatar Jun 03 '23 09:06 Spelis123

so does it actually work on windows 🧐🧐🧐🧐

aurum77 avatar Jun 03 '23 10:06 aurum77

so does it actually work on windows 🧐🧐🧐🧐

well no, i cant get it to actually show up in firefox.

Spelis123 avatar Jun 03 '23 10:06 Spelis123

Having the same issue here when using the plugin on a windows machine. From what I am able to determine after a small bit of troubleshooting, it seems that the file path that the plugin attempts to install to is in an incompatible format for the windows file system. Not 100% sure on this, but seeing as it works flawlessly on my Mac, but doesn't actually start the LiveServer on windows, without throwing any errors, this is the only thing I can think of. This hypothesis seems to be supported by the fact that the directory that live-server thinks it installed to, doesn't actually exist after install, as you can see in this screenshot: image

Not 100% sure that this is the case, but seems to add up to me, also not super sure on how to adjust for this, as I have never written a plugin, but might take a look at this code and see if I can come up with something. Love the plugin though, has been exactly what I was looking for coming from VSCode to Neovim. Thanks again!

CraigSau avatar Oct 24 '23 21:10 CraigSau

Hello there, sorry for the late response. I tried to fix this but it seems that nvim can't spawn a npm process 🧐, this could be a nvim bug or a libuv bug

aurum77 avatar Oct 30 '23 08:10 aurum77

after installing npm/node and restarting my Windows 11 PC and running :LiveServer it wont start. it says its started but when i manually go to firefox and enter 127.0.0.1 or localhost it fails to load the page.

NOTE: This post has been edited.

i had same problem

The reason is that the plugin does not create a folder in nvim-data\live-server and therefore can't install live server


andrrrw avatar Jan 20 '24 07:01 andrrrw

npm log here https://paste2.org/7aVhczkf image

andrrrw avatar Jan 20 '24 07:01 andrrrw

The solution is simple FOR WINDOWS: just create folder live-server in your nvim-data and it will work

andrrrw avatar Jan 20 '24 07:01 andrrrw

Btw i can't specify my own path for installing live-server npm see only in nvim-data/live-server

andrrrw avatar Jan 20 '24 08:01 andrrrw

Hey! (Still the same person, just lost my account)

This is pretty interesting but I haven't really gotten to use live server yet (because I didn't feel like I needed it on my new config) and I also switched to Linux a while back :) so I think it'd just work out of the box but as I said I haven't tested it yet.

Spelis avatar Jan 20 '24 10:01 Spelis

The solution is simple FOR WINDOWS: just create folder live-server in your nvim-data and it will work

This worked for using Firefox.

chamannarved avatar Jun 20 '24 16:06 chamannarved