Split off from #27664 for separate tracking, see https://github.com/nodejs/node/issues/27664#issuecomment-493673645 and https://github.com/nodejs/node-gyp/issues/1755.
Split off from #27664 for separate tracking, see #27664 (comment) and nodejs/node-gyp#1755.