-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hot reload not working on WSL #5155
Comments
Same error here, I faced the same error with WSL, I installed Ubuntu and still face the same error. |
Same issue here since yesterday. I thought I was doing something wrong. Ubuntu WSL. Edit: Solved this in a later reply. Also solved the Elysia/Hono issue, I was using a |
If your project is located in the windows file system and you're accessing them through Moving my project and working within Linux environment allowed me to use |
Thank you! Solved for me. Anyone knows how to open a VSCode window on Windows but using the linux file system with WSL? Edit: Nevermind. All extensions are installed. What I lost was the shortcuts to them on the left sidebar. Edit 2: To anyone that needs this tip, to open VSCode in the linux file system with WSL: Code_41bjxjKyP5.mp4Edit 3: Got my extensions working. I had to browse the extensions I use, and then I get a hint besides the extensions name "install in WSL". Some extensions need this. |
I'm not the Issue's author. Thank you. |
Hey Angel,
I sent the email in the wrong window, it was for a different topic, lol.
Please ignore it!
Thanks
On Sat, Sep 16, 2023 at 11:42 PM Angel Hernandez ***@***.***>
wrote:
… Thanks, feel free to close the ticket since I've shared my feedback and
there is no further action required. Regards, Hamza
… <#m_-6604571682452136913_>
On Thu, Sep 14, 2023 at 11:21 PM Angel Hernandez *@*.*> wrote: If your
project is located in the windows file system and you're accessing them
through /mnt with WSL, hot reload will not work. See here <#4335 (comment)
<#4335 (comment)>>.
Moving my project and working within Linux environment allowed me to use
--hot. Thank you! Solved for me. Anyone knows how to open a VSCode window
on Windows but using the linux file system with WSL? I managed to move my
bun project from windows file system to linux file system and now
--watch/--hot work, but I lose all my VSCode extensions because it's using
a linux version of VSCode... — Reply to this email directly, view it on
GitHub <#5155 (comment)
<#5155 (comment)>>, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AKE3OQFBA4ZJ5Q5ZGGNVRMDX2NRLDANCNFSM6AAAAAA4VNI5IM
<https://github.com/notifications/unsubscribe-auth/AKE3OQFBA4ZJ5Q5ZGGNVRMDX2NRLDANCNFSM6AAAAAA4VNI5IM>
. You are receiving this because you authored the thread.Message ID: @.*>
I'm not the Issue's author. Thank you.
—
Reply to this email directly, view it on GitHub
<#5155 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKE3OQHQJUSK24L2SQ7PY2TX2YFL7ANCNFSM6AAAAAA4VNI5IM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@yordan Trivada Bian didn't find your reply in the bun hot reload Issue page. I just learned we can reply via email!
Anyway, as far as I know, and I can be wrong of course, the hot reloading on the browser needs communication via sockets, and that's how Vite does it.
The browser needs to connect to the server and know when the code changed and was rebuilt to add the modified changes to the DOM.
It happened to me with a library that is Vite Node, I was so used to Vite's hot reload in the browser, that when I tried a backend project, I expected the browser to also reload hahaha. 😂
Maybe Bun's hot reload injects some code in the served HTML pages to achieve this, I will read about it now.
…________________________________
From: Yordan Trivada Bian ***@***.***>
Sent: Monday, September 18, 2023 2:17 PM
To: oven-sh/bun ***@***.***>
Cc: Angel Hernandez ***@***.***>; Comment ***@***.***>
Subject: Re: [oven-sh/bun] Hot reload not working on WSL (Issue #5155)
If your project is located in the windows file system and you're accessing them through /mnt with WSL, hot reload will not work. See here<#4335 (comment)>.
Moving my project and working within Linux environment allowed me to use --hot.
thanks this solve the issue. Now I could see my file reload in the terminal, but when I setup an http server my browser (chrome) didn't reload automaticaly (I have to refresh to see the changes). Do you have any clue to solve this?
—
Reply to this email directly, view it on GitHub<#5155 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACNYB3MLVLJ3TEKMYRJEAZLX3CF3FANCNFSM6AAAAAA4VNI5IM>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Oh look! From bun's docs: [cid:703ec706-b9e1-40ee-a38c-3d31ebf98cac]

…________________________________
From: Angel Hernandez ***@***.***>
Sent: Tuesday, September 19, 2023 3:41 PM
To: oven-sh/bun ***@***.***>
Subject: Re: [oven-sh/bun] Hot reload not working on WSL (Issue #5155)
@yordan Trivada Bian didn't find your reply in the bun hot reload Issue page. I just learned we can reply via email!
Anyway, as far as I know, and I can be wrong of course, the hot reloading on the browser needs communication via sockets, and that's how Vite does it.
The browser needs to connect to the server and know when the code changed and was rebuilt to add the modified changes to the DOM.
It happened to me with a library that is Vite Node, I was so used to Vite's hot reload in the browser, that when I tried a backend project, I expected the browser to also reload hahaha. 😂
Maybe Bun's hot reload injects some code in the served HTML pages to achieve this, I will read about it now.
________________________________
From: Yordan Trivada Bian ***@***.***>
Sent: Monday, September 18, 2023 2:17 PM
To: oven-sh/bun ***@***.***>
Cc: Angel Hernandez ***@***.***>; Comment ***@***.***>
Subject: Re: [oven-sh/bun] Hot reload not working on WSL (Issue #5155)
If your project is located in the windows file system and you're accessing them through /mnt with WSL, hot reload will not work. See here<#4335 (comment)>.
Moving my project and working within Linux environment allowed me to use --hot.
thanks this solve the issue. Now I could see my file reload in the terminal, but when I setup an http server my browser (chrome) didn't reload automaticaly (I have to refresh to see the changes). Do you have any clue to solve this?
—
Reply to this email directly, view it on GitHub<#5155 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACNYB3MLVLJ3TEKMYRJEAZLX3CF3FANCNFSM6AAAAAA4VNI5IM>.
You are receiving this because you commented.Message ID: ***@***.***>
|
thank you for your reply, I was confused by the docs where they show the browser reload side by side comparison with nodemon in Watch Mode > --hot mode section. exactly like what you did mention, I am currently learning svelte which also has hot reload, and I am just so used to it that I even expect backed code to reflect hot reload in the browser without send a new request 😂 |
Can confirm both |
Just want to resurface this issue of not being able to |
Hey but what is the solution if you want to keep it under the windows file system? I have a backend app that I want to run with WSL and it is nested inside a frontend app that I run in Windows normally |
What version of Bun is running?
1.0.1+31aec4ebe325982fc0ef27498984b0ad9969162b
What platform is your computer?
WSL Ubuntu 20.04 Over Microsoft Windows NT 10.0.22621.0 x64
What steps can reproduce the bug?
bun install express
bun install -d @type/express
index.ts
hot
orwatch
[bun --watch index.ts
orbun --hot index.ts
]OKZ
withOKAYZ
What is the expected behavior?
While the server is running using
--watch
or--hot
it should perform hot reload for the application, so instead of receiving OKZ in step #6 instead it should return OKAYZWhat do you see instead?
While the server is running using
--watch
or--hot
I keep receiving the initial server buildAdditional information
There is an open thread on discord, link
The text was updated successfully, but these errors were encountered: