Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I use your starter to develope but it always stop running during hmr #1

Open
ZuulAndRibbon opened this issue Jul 6, 2022 · 2 comments

Comments

@ZuulAndRibbon
Copy link

vite will stop and console record this:
Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
at new NodeError (node:internal/errors:371:5)
at Worker.[kOnExit] (node:internal/worker:276:26)
at Worker..onexit (node:internal/worker:198:20)
Emitted 'error' event on Worker instance at:
at Worker.[kOnExit] (node:internal/worker:276:12)
at Worker..onexit (node:internal/worker:198:20) {
code: 'ERR_WORKER_OUT_OF_MEMORY'
}

every time i run the project again but i will occur again after some time. how can i do this? u use node to do what?

@logue
Copy link
Owner

logue commented Jul 8, 2022

I have confirmed that this phenomenon occurs frequently after Node 18.

I don't know if it is a specification, but since the cause is memory, try increasing the allocation amount with environment variables (NODE_OPTIONS) and execution parameters.

--max_old_space_size={MB}

@logue
Copy link
Owner

logue commented Jul 13, 2022

Related:
vitejs/vite#2433

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants