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.

[Bug] Out of Memory with basic template

See original GitHub issue

Reporting a bug?

I’ve created a new site from the basic template. After doing a build and serve, opening the site locally creates an Out of memory error. As far as I can see it’s stuck in hydrating. Commenting out React.Suspense in App.js fixes the issue.

This also happens when the react(-static) packages are updated to the latest versions.

Environment

react-static cli 7.5.0

  System:
    OS: Windows 10 10.0.19041
    CPU: (24) x64 AMD Ryzen 9 3900 12-Core Processor
    Memory: 44.57 GB / 63.90 GB
  Binaries:
    Node: 12.18.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.4 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 88.0.4324.150
    Edge: Spartan (44.19041.423.0)
    Internet Explorer: 11.0.19041.1
  npmPackages:
    react: ^16.9.0 => 16.14.0
    react-dom: ^16.9.0 => 16.14.0
    react-static: ^7.2.0 => 7.5.0
    react-static-plugin-reach-router: ^7.2.0 => 7.5.0
    react-static-plugin-sitemap: ^7.2.0 => 7.5.0
    react-static-plugin-source-filesystem: ^7.2.0 => 7.5.0

Steps to Reproduce the problem

Base your steps off of any freshly installed react-static template! basic template:

  1. yarn build
  2. yarn serve
  3. Open in chrome
  4. Browser tab crashes after a while

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:21 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
SleeplessBytecommented, Feb 20, 2021

Released as 7.5.3

I tried it out on my machine after releasing and it works. Let me know if it doesn’t for you.

2reactions
kespindlercommented, Feb 19, 2021

Not sure if this is helpful, but I’m encountering this and getting some odd behavior.

I get the infinite loop leading to crash with both basic and typescript templates. I also discovered that commenting out React.Suspense fixes the issue. However, doing that causes the dev server to serve an error on every page.

An internal error occured!

Error: RoutesInner suspended while rendering, but no fallback UI was specified.

Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.

However, if I then edit a file, causing the dev server to reload, the issue goes away and the entire site loads fine. If I restart the dev server, it again errors until I modify a file to cause it to reload.

@TriDotS 's solution of downgrading to 7.4.2 worked for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - [Bug] Out of Memory with basic template - - Bountysource
Reporting a bug? I've created a new site from the basic template. After doing a build and serve, opening the site locally creates...
Read more >
Printable Insect and Bug Templates in 2022 - Pinterest
These pages can help kids practice fine motor skills, handwriting, scissor skills, memory, problem-solving, and more. These activities are great for preschool, ...
Read more >
Fast run out of memory compiling template specialization
3 and g++ 4.7.0, quickly eats up all memory and swap space. The similar templates source in a real project quickly (in 10-20...
Read more >
Javascript Out of Memory Heap Error when 1900+ Posts Added
Ah, I have run into this locally when I was working on my Twitter Archive project (one pagination template generated over 27000 pages)....
Read more >
java - Groovy TemplateEngines and OutOfMemory. Possible ...
For fun, try running System. gc() . I've seen odd behavior with thread-local creation running out of memory and strangely that forced the...
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