Ask coding questions

← Back to all posts
React app using react-p5 fails to start with out of memory issues
h
KumuPaul (0)

I'm trying to figure out why a very basic ReactJS app (created from the Create React App template) fails to start when it uses a component that depends on the react-p5 package.

https://replit.com/@KumuPaul/ReactP5DemoBrokenOutOfMemory

This app runs fine locally. And I've checked memory usage using gnu-time and it is pretty much the same whether I include the react-p5 component or not (specifically yarn start uses ~68mb of memory).

Any ideas how to fix or debug this issue?

Comments
hotnewtop
KumuPaul (0)

I see the following output in the Console when I run the repl:

Starting the development server...

Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
exit status 1
Coder100 (18904)

@KumuPaul Well, have you tried yarn upgrade?

Also, if you read the full error, it most likely more is caniuse-lite is outdated.

KumuPaul (0)

@Coder100 That is just a warning. I seriously doubt that caniuse-lite being outdated would cause the entire process to crash or be killed. Also, I see that warning when I comment out all references to the component that uses react-p5 as well. Lastly, caniuse-lite is a dependency of babel which is a dependency of react-scripts, so this warning is just inherent in using the current version of the Replit.com Create React App template, which uses react-scripts 3.3.0 rather than the up to date 4.0.3.

Saml2020 (66)

It shows Compiled successfully! for me.