-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Instability problems: Nuxt.js server responds very slowly on local / dev environments #6202
Comments
Update: things seem to be working fine if you run "npm run build && npm run start", though the logs still show lots of messages from workbox. On running |
In the console logs:
|
Please add a repository or CodeSandbox that clearly shows the problem. |
@manniL the issue went away when I cleared all cookies, local storage and other "stuff" in chrome dev tools. So, I cant reproduce this anymore...but I know this problem was there and it happened on doing a "npm update". The pages simply refused to load from the server. I defer to you on what you want to do next. |
The problem happes when you run your production version on localhost:300 with pwa/workbox enabled and then run dev on same port without unregister service worker. This is a long known issue which happens for webpack HMR already registered workbox. |
Interesting @pi0 thanks for the extra color here. As an aside, I'm seeing another intermittent issue on running "npm run dev' where the pages dont load. In that case I have to stop the terminal and run "npm run dev" again. That usually fixes it, but it's a minor annoyance. |
This issue is directly related to HMR and Workbox. However, there was an open issue in pwa repository. I think for waiting for a workaround we may open an issue there or mention this as a known issue in the docs. Not really related to nuxt core.
Is this happening even without workbox being registered? A reproduction would be awesome. The #6186 should also potentially fix it for 2.9. you can early test it using nuxt-edge. |
@pi0 sounds good and makes sense to keep the PWA one open. This 2nd issue: Is it recommended we use Nuxt-edge or is there a way to try out 3.0 beta? Don't see a tag here for it. |
@connecteev there is no nuxt 3 beta out yet. nuxt-edge is recommended for personal or projects with a small team working on. All nighly releases are fully automated tested but there might not be a proper changelog and integration tets. |
@pi0 cool. Will nuxt-edge become the nuxt-3 beta and eventually nuxt 3? I did a
or only the latter is enough and can I remove the first line? Btw, I couldn't find any good, official information on nuxt-edge from googling around. Is there a guide / more information on nuxt-edge and what is included. Thanks. |
Not exactly. It is a preview of all next release. Currently 2.9. And only Regarding docs, we don't have them yet. |
@pi0 got it. I just tried a nuxt-edge installation and it keeps squawking about one error after another...not sure what I am missing or whether this just isnt ready for prime time yet.
|
There might be something wrong with npm/yarn. Try cleaning node_modules and lock file. PS: @nuxt/... packages should be automatically installed. |
@pi0 Great thanks...that worked. Glad that my site still works with the latest and greatest version of nuxt. While there are some glitches we encountered in this ticket, I have no issues right now. I'll come back to update this issue if I see anything is odd. |
This is not an issue anymore |
Faced the same issue today. Issue seems to do with websockets and their availability. After restarting the system, it worked fine. |
Same problem again today ! |
Recently have encountered such a problem! |
Same problem here too. |
我后面发现出现热跟新失败的原因 我猜测是因为和电脑cpu只有两个内核, 当我开第三个网页的时候就会出现热更新失败的现象, 一直保持两个页面就不会出现这种现象 |
Thank you very much for the answer. Quoting your reply because it hasn't got enough attention. |
Thank you. changed the port number. now it's working without any issue |
Stopping the service worker via devtools fixes it for me, but it still locks up periodically. Stopping the SW seems to unlock it again. |
确实是这个问题。。。但是我电脑是8核的。。。也是开三个就热更卡死 |
Спасибо |
Hopefully these workarounds are temporary and the nuxt team looks into the stability issues....not good if this happens to production users. |
This issue has never happened in prod so far. The reason, as well as a workaround, is also known. There is nothing to worry about in production environments!
|
I agree with @manniL. This will only happen in local as well. You need to have both dev and prod environment with the same URL and port for this to happen. |
i have the same problem when i run dev with NODE_ENV=production, delete Cache Storage in browser an then run dev width NODE_ENV=development |
我认为是因为浏览器有连接数限制, 因为我看到浏览器会显示正在等待可用的套接字 |
today I faced this problem, with nuxt-socket-io and nuxt.js and the problem was resolved when I removed
or
Essentially the hot reloading would not work if I was on 192.168 and https, but either by itself was fine anything idea what may be causing this? |
I have the same issue, page takes forever to load, it works only after I re-run |
ran into very similar timeout issues while using hot reload. another data point:
Edit/UpdateNope - that didn't work and the issue has returned. Will report additional findings if possible... |
Just few seconds ago all worked fine for me, but now appeared this issue. I did not changed any nuxt or project config, just only edited some components and pages as usual. I restarted google chrome and the problem disappeared. |
I am seeing this same issue with a new Nuxt project. I have no custom Webpack setup, and the only additional settings for the Nuzt config are for the @nuxtjs/auth module. Does anyone have more info on what is going on. Having to restart the dev server every few minutes is brutal. |
Having the same issue for several days now, changing the Nuxt port to something other than 3000 fixed it for me "scripts": {
"dev": "nuxt --port 5050"
} |
This fixed it for me, thank you! |
I'm changing port in package.json and .env file It's works |
I don't quite understand. Would you please tell me in detail |
Hello, |
I noticed that for me, only on chrome, but localhost will have those nuxt timeout issue with "Manifest request to /_nuxt/5d8bf94471479c1c5ddc.hot-update.json timed out." but it goes away if I replace localhost with 127.0.0.1, I don't know much about those loopback interface not sure why this is the case only for chrome. This issue doesn't seem to show in firefox nor safari. |
I have those errors by replacing localhost with 127.0.0.1 or not :
For now it's work (with 127.0.0.1) but given that I still have the error, I think that it's going to start again. I have not the error on Chrome (just on Safari) but on Chrome sometimes it was not working. |
That's it, it starts again... |
I have a similar problem, my Nuxt v2.17.1 project, when I open it from Chrome it stays loading (load spinner appears), and it takes 3-15 seconds to fully load the app. I have SSR disabled. In incognito and guest mode this does not happen or in other browsers. It is worth mentioning that I have no extensions installed. I tried over and over again clearing cache and all browser data but the same thing keeps happening. My version of Node.js v16.16.0 In fact, I create a whole new project from scratch and the same thing happens: I get the Loading spinner. I have uninstalled and reinstalled Chrome several times from scratch (even older versions), I have even removed the keys that the browser generates in regedit but the problem persists. In my nuxt.config.js I set the load value to 'false' and it still shows up. I tried on another computer and the load is immediate, the spinner is not shown. So this "error" is kind of weird. I tried changing the localhost port and nothing. I tried with Postman and the response is immediate, the only drawback is with Chrome. |
Version
v2.8.1
Reproduction link
http://jsfiddle.net
Steps to reproduce
Just run npm update, then load any pages on the site (on dev / localhost), and notice: many pages either dont load, or reload. The console is also flooded with messages. I've included the diff'd package-lock.json.
What is expected ?
Should not be seeing any slowness.
What is actually happening?
After an npm update, this issue came back: #3566
Nuxt.js server responds very slowly, even on local / dev environments. The console is flooded with workbox messages, and a lot of pages on my site don't load, or reload.
Something broke because of the updated package-lock.json below.
The text was updated successfully, but these errors were encountered: