Closed katlim-br closed 2 years ago
It seems it relates to the RE2 dependency. I tried url-regex and it passed ok.
Also, I tried to create a new package with that dependency only url-regex-safe, jest, yarn. And it didn't fail :(.
As background, we work in a monorepo, and we have around 170 tests (in 36 suites).
So, I give in the fact that it seems like the sum of many things (although we can't exactly identify them), but do note that when I comment out the code that references this library, the error goes away.
Any help would be appreciated.
Do you have multiple re2 installations? See https://github.com/uhop/node-re2/issues/73.
I just found that issue some minutes ago, indeed we use two libraries email-forward-parser and url-regex-safe, both use re2.
We created this repo https://github.com/blastradius-ai/re2-malloc-error to start documenting it, and also to easily reproduce it.
Any ideas how to solve it?
it does solve the issue!!! big thanks!
When I import const urlRegexSafe = require("url-regex-safe");
and run jest --runInBand, the following error shows up:
And when running in github actions, it shows
At first I thought it was jsdom, then I thought htmlparser2 or even parser5, but in the end was this library that seems to make the error.
Any thoughts why?