error C2039: 'IsNearDeath': is not a member of 'Nan::Persistent<v8::Object,v8 ::NonCopyablePersistentTraits<T>>

I have tried many things to solve this issue. It seems like the version v12.3.1 is not stable yet. As a workaround, I installed the version v10.16.0 and that fixed the issue. As I had installed the latest version previously (v12.3.1) the Node.js was not allowing me to install a lower version, so I had to uninstall the Node.js and install the v10.16.0. I hope it helps.

Update:

As @forsunnet mentioned in his comment, the issue is with the version 13.12 too, going back to version 11.x solved the issue for him.


I was able to fix the issue (for me at least) on Node v12.13.1:

  • delete package-lock.json
  • delete node_modules directory
  • rerun npm install

Looking at the diff of package-lock.json reveals that some of the problematic packages are obviously outdated:

enter image description here