[ ] A concern is npm start throws Javascript heap out of memory error. (keyword: react start stuck at Starting the development server JavaScript heap out of memory) We needed to allow 8G of memory in order for the dev server to spin up.
An SO post describes that he examine each library/component one by one and fix it by fixing the syntax errors first. So maybe the first step is to resolve all the warnings. Do use --max_old_space_size=8192 to start the dev server and see all the warnings, then fix them one by one. Also consider update all the packages.
This SO points out it's the source map files that are too large and it causes such issue.
Also note that nom run deploy gives the below warning:
The bundle size is significantly larger than recommended.
Consider reducing it with code splitting: https://goo.gl/9VhYWB
You can also analyze the project dependencies: https://goo.gl/LeUzfb
[x] If we delete node_modules and package-lock.json, then npm i, the above memory issue went away
However, React now errors on Can't perform a React state update on an unmounted component... use useEffect()... even if all components mentioned in the error message does not use any state at all.
Solves issues on
Related pull request
Concerns
npm start
throws Javascript heap out of memory error. (keyword:react start stuck at Starting the development server JavaScript heap out of memory
) We needed to allow 8G of memory in order for the dev server to spin up.--max_old_space_size=8192
to start the dev server and see all the warnings, then fix them one by one. Also consider update all the packages.nom run deploy
gives the below warning:node_modules
andpackage-lock.json
, thennpm i
, the above memory issue went awayCan't perform a React state update on an unmounted component... use useEffect()...
even if all components mentioned in the error message does not use any state at all.Resources