-
Notifications
You must be signed in to change notification settings - Fork 125
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
Memory usage of nuxt dev with typescript grows indefinitely #355
Comments
@guaneec Sounds to be related to the So unless there's something we don't call to clear something, it may be something we can't fix here 🤔 |
Also, It's normal TypeScript uses more memory than JavaScript by default, and it also caches more thing overtime when doing multiple reloads. I have not being able to easily reproduce the memory leak error though. |
Have same problem using npm :( |
Upgrade to last version of |
Didn't help, every nuxt.config.js (add/remove random plugin) change increase memory usage on ~400mb (in my case) 602mb -- By the way: here is my module config
But project drops when memory is more then default limit (2048) |
@guaneec Issue doesn't happen if |
@kevinmarrec looks like you wanted to call me, not Pass
leads to same result |
Indeed sorry @guaneec for the ping 🙈 @crutch12 The thing is So I don't think it's really something painful, as well as I don't know if it's fixable, it's more likely dependent to dependencies we're using and not the module itself :/ |
But why memory limit option doesn't work? |
@crutch12 Maybe you're being mistaken between Nuxt Memory usage & https://github.com/TypeStrong/fork-ts-checker-webpack-plugin type checking memory limit ? |
Any updates @crutch12 ? |
Looks like that I think I have to use |
I references this problem here: nuxt/nuxt#7412 the problem is present even without typescript (maybe it's a clue). We "patched" it by running Here is the part of pm2 conf that may (or not) interest you:
|
@kevinmarrec |
I'm not sure how can I help if it's also reproducible without TypeScript :/ |
👀 1 here. After one time to press CTRL + S --> The memory usage increasing! After N times! It will be crashed! Yeah, after XYZ times @kevinmarrec hope you can check it! |
The problem seems to have been fixed! |
If anyone else would like to test with |
Careful it is on branch |
@Eygle |
My bad, I didn't know this package |
Describe the bug
The memory usage of nuxt with typescript enabled seems to grow unbounded with each reload of
nuxt.config.js
To Reproduce
Steps to reproduce the behavior:
yarn create nuxt-app myproject
. Choose typescript for the programming language and use default for all other options.yarn dev
Expected behavior
Memory usage should stay below ~500MB
Screenshots
If applicable, add screenshots to help explain your problem.
Language: typescript (bug):
Language: javascript (expected):
Additional context
With lang=ts, if I run
node --trace-warnings node_modules/.bin/nuxt >/dev/null
, I get a stack trace:Tested on WSL 1 (Ubuntu 18.04.2 LTS)
The text was updated successfully, but these errors were encountered: