npm err! command failed npm err! command sh -c node-gyp rebuild
This is probably to do with version incompatibility - the version of the addon you're trying to compile isn't compatible with the version of Node you're trying to compile against. This is a very common thing when a new release line of Node comes out--the ecosystem needs to catch up. Node 12.1.0 is early into Node 12, so you either need to be patient for the authors of the addon to catch up or you need to update your dependencies, or get your dependencies to update their dependencies to compatible version. Or just downgrade your Node version and be patient.
If you're interacting with addon authors on these issues, encourage them to migrate to https://github.com/nodejs/node-addon-api which is intended to be a more stable API and ABI to compile against and should reduce these kinds of problems into the future.