Nuxt dev server hangs when using `findResultsState` with children routes
See original GitHub issueBug 🐞
I have an odd issue when using Nuxt, SSR, and vue-instantsearch. Following this guide, I’ve made a stripped down demo repo of the bug in question (I’ve confirmed that the issue is happening with a fresh git pull
, yarn
and yarn dev
of that repo).
It simply seems that some combination of using this.instantsearch.findResultsState
in serverPrefetch
and having a <router-view />
or <NuxtChild />
in the same component causes the dev server to eat a bunch of memory and eventually crash. Sometimes an event emitter error is printed to the dev server console. Aside from that, not much to go on.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Nuxt app freezing while using nested routes - Stack Overflow
vue i have two components that should load in sub pages. in browse index.vue i have <nuxt-child/> but it doesn't render those component...
Read more >Server-side rendering with Vue InstantSearch - Algolia
There are different ways of making a server-side rendered app with Vue. We'll cover how to do it with Vue CLI and with...
Read more >algolia - Bountysource
Bundle Size / Nuxt: Why is vue-server-renderer included in Nuxt Frontend ... Nuxt dev server hangs when using `findResultsState` with children routes $...
Read more >The Nuxt 3 Crash Course - YouTube
This is 3 hours of a 9-hour course hosted on Udemy. You will learn everything you need to become a Nuxt 3 expert....
Read more >File System Routing - Nuxt
Nuxt lets you create nested routes by using the children routes of vue-router. To define the parent component of a nested route, you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @Haroenv,
With Nuxt 2, I was also having memory leak issues. Using Siege, I was doing user simulation of 40 request in 30 seconds, and each time memory was increasing.
However, #1115 did fix the issue.
After building the library with #1115 , I was getting a constant 70mb usage which was not increasing in memory even after 120 request in 60 seconds.
#1117 did not fix the “TypeError: Cannot set property $nuxt of [object Object] which has only a getter” on my side. What I did to fix this was change a boolean on line 115 in createServerRootMixin, from true to false.
const isWritable = descriptor ? descriptor.writable || descriptor.set : false;
In Nuxt 2, descriptor is undefined, so I just made sure “isWritable” is set to false.
@Haroenv i tried it and it does not solve the issue.