Basically, Persistent<T> has an implicit non copyable trait, that is there for a reason, and nan works around that "problem" by memcpy-ing the object. G++ 8 is smart enough to detect this and throw a warning. It is a fundamental issue that cannot be solved without modifying V8.
As much as I hate this fix, there is simply no solution to that horrible line in nan_weak.h
https://github.com/nodejs/nan/blob/8e4603d00fcbb5069b04da1368939d885163e2ce/nan_weak.h#L58
Basically,
Persistent<T>
has an implicit non copyable trait, that is there for a reason, and nan works around that "problem" by memcpy-ing the object. G++ 8 is smart enough to detect this and throw a warning. It is a fundamental issue that cannot be solved without modifying V8.