question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nuxt dev server hangs when using `findResultsState` with children routes

See original GitHub issue

Bug 🐞

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:open
  • Created 2 years ago
  • Reactions:3
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
eugjleecommented, Aug 11, 2022

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.

Screen Shot 2022-08-11 at 15 24 54

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.

1reaction
podlebarcommented, Mar 30, 2022

@Haroenv i tried it and it does not solve the issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found