JSON.stringify throws RangeError: Invalid string length for huge objects
I too have seen this unhelpful/misleading nodejs error message, so I booked an issue over at nodejs github
RangeError: Invalid string length --- it should be saying Out Of Memory