i18next: Run eslint -> JavaScript heap out of memory
π Bug Report
If i run eslint i got this error since i18next v2.4.4. It comes from the rules β@typescript-eslint/no-misused-promisesβ. I donβt know if it is a @typescript-eslint or i18next bug. With v2.4.3 or before there are no problems.
> eslint ./
<--- Last few GCs --->
[12938:0x67d8210] 77956 ms: Mark-sweep (reduce) 1881.7 (1921.3) -> 1881.7 (1914.3) MB, 950.8 / 0.0 ms (average mu = 0.564, current mu = 0.000) last resort; GC in old space requested
[12938:0x67d8210] 78893 ms: Mark-sweep (reduce) 1881.7 (1914.3) -> 1881.7 (1914.3) MB, 936.6 / 0.0 ms (average mu = 0.379, current mu = 0.000) last resort; GC in old space requested
<--- JS stacktrace --->
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: 0xb6e500 node::Abort() [node]
2: 0xa7e632 [node]
3: 0xd47f20 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xd482c7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xf137bf v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
6: 0xef3b80 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
7: 0xeeb14c v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawArray(int, v8::internal::AllocationType) [node]
8: 0xeeb2c5 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller(v8::internal::Handle<v8::internal::Map>, int, v8::internal::Handle<v8::internal::Oddball>, v8::internal::AllocationType) [node]
9: 0x11a493e v8::internal::MaybeHandle<v8::internal::OrderedHashMap> v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::Allocate<v8::internal::Isolate>(v8::internal::Isolate*, int, v8::internal::AllocationType) [node]
10: 0x11a49f3 v8::internal::MaybeHandle<v8::internal::OrderedHashMap> v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::Rehash<v8::internal::Isolate>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::OrderedHashMap>, int) [node]
11: 0x12ae96d v8::internal::Runtime_MapGrow(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x16e99f9 [node]
Aborted (core dumped)
To Reproduce
run eslint with rule β@typescript-eslint/no-misused-promisesβ
Expected behavior
That eslint runs through again
Your Environment
- runtime version: node v18.12.1
- i18next version: v2.4.5
- os: Linux
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 10
- Comments: 38 (7 by maintainers)
@adrai Same issue on v22.4.6
Sorry about my previous comment, we finally managed to fix our
Error: Worker terminated due to reaching memory limit: JS heap out of memory
by increasing virtual memory (NODE_OPTIONS) of node with 8Gb (as explained here).Working for us with @latest
i18next
&react-i18next
:Here our script using vite :
please mark as not stale
@ximex do you have
@typescript-eslint/no-misused-promises
enabled?@esetnik seems @pedrodurek is still waiting for an example by you?
I can confirm this is still occurring on v22.4.10
Minimal repo is now available here: #1901 @adrai. Hope this helps!