-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
HMR (with Vite) randomly skip updates and stop working #11956
Comments
Updates :
and
If you begin with:
then modify the div and add a paragraph in your code like :
You will have in the browser :
Hope this helps ! |
I have a similar issue with Nuxt 3, where the HMR updates are randomly skipped or even stopped at all. Nuxt 3.0.0-27249044.7d918e1 Provided a component below, if I change to There are no errors in the console. In an adequate new pure Vite project it works as it should. Link to reproduction: https://github.com/gustojs/nuxt3-repro-1036
|
Environment
Describe the bugCleanShot.2021-10-27.at.22.58.59.mp4Reproductionhttps://github.com/productdevbook/nuxt3-app Additional contextThis seems to me to be in vite. because when I translate css, it fixes the project. There seems to be a problem with compiling Sass. but we're not entirely sure Logs✔ Vite server built in 111ms
(node:15424) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created) |
+1 I face this problem as well. |
Just started with the nuxt3-app template and have the same issue |
I'm not sure if this is related/helpful or not, but I'm experiencing similar issues with HMR and components specifically. When adding a new component and calling it on a page, HMR doesn't appear to be watching/rendering the new component. I get the errors...
In order to get a new component to render at all with HMR working properly again, I have to stop and restart the server. |
For me HMR dose not work in fresh
If i remove note: this problem only for javascript(editing html tags inside |
it's still not fixed? |
@antfu can you take a look at it after your holidays? |
see also #13325 |
I'm having this problem too, using nuxt3 default template |
For me also HMR is broken after starting a new project via |
I am investigating this. I can reliably reproduce this behavior in https://github.com/nuxt/modules by editing the From what I can see the error is caused by Vue failing to retrieve the DOM For everyone in this thread, I would be appreciated to receive a minimal reproduction repo or Stackblitz as I can't reproduce it with the starter template myself. Thanks ahead! |
After investigating with @danielroe, this might actually cause by two different issues.
|
Hi @antfu, https://github.com/productdevbook/nuxt3-app upgrade new vue 3.2.31 and all dependencies. (yarn.lock delete and re-install). Hot reload fixed but, text, background color change but dont hot reload change. |
If helps for something, I was having this same problem on a Vue 3 Vite + typescript project, and fixed it by undoing the last thing I did that was exporting something from main.js and importing it on other places of my project, so I moved it to a pinia store and im using it from the state now hot reload is working fine |
Just in case some developer stumbles upon this I emptied cache and hard reloaded it works again |
Comments above seemed not to work for me.
Worked fine after that. (Develop purpose only) |
That fixed it for me (in chrome's dev tool, Application/Storage => Clear site data), disabling ssr had no effect. If you are using docker, don't forget to open the port |
Lol this worked for me. The good ole "Did you try to unplug it and plug it back in again." Thank you! |
Thanks! It worked fine here :) |
For me the problem was that I was importing |
@scratchmex Please create a new issue with a minimal reproduction for us to track, thanks. |
I created a new nuxt 3 project and I had this problem, but only the files in the pages directory were not hot reloaded. For this I tried replacing the |
thanks mate! |
@sebpalluel, thanks, open the port 24678 solved my problem 😅 (im using docker with wsl 2 ) |
Environment
Nuxt CLI v3.0.0-27236898.4a34c2a
RootDir: G:\PROJECTS\Testing\NUXT\nuxt3-app
Nuxt project info:
Describe the bug
HMR with Vite randomly skip updates, I mean some (random I guess) updates on the code don't show up on the browser.
Reproduction
Just use the basic generated app from the CLI and add/remove some code in the template part of
app.vue
.Repeat that until you notice that some updates on the code don't show up on the browser.
It is more noticeable if you work fast with
tailwindcss/windicss
.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: