@@ -3,7 +3,7 @@ var cp = require('child_process');
 var fs = require('fs');
 
 if (fs.existsSync('src')) {
-  cp.spawn('npx', ['gulp', 'compile'], { stdio: 'inherit' });
+  cp.spawn('npm', ['run', 'build:dts'], { stdio: 'inherit' });
 } else {
   if (!fs.existsSync('lib')) {
     console.warn('MongoDB: No compiled javascript present, the driver is not installed correctly.');
#! /usr/bin/env node
var cp = require('child_process');
var fs = require('fs');

if (fs.existsSync('src')) {
  cp.spawn('npx', ['gulp', 'compile'], { stdio: 'inherit' });
} else {
  if (!fs.existsSync('lib')) {
    console.warn('MongoDB: No compiled javascript present, the driver is not installed correctly.');
  }
}

I keep wanting to dump this file, also calling `npm run` from a child_process just feels totally wrong, but I don't have an immediate better answer