title: Node callback style with promisify? "The 'original' argument must be of type function"
body: <p>I'm using <code>util.promisify</code> in a Google Cloud Function to call IBM Watson Text-to-Speech, which returns a callback. My code works but I get an error message:</p>
  
  <pre><code>TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
  </code></pre>
  
  <p>The <a href="https://nodejs.org/dist/latest-v8.x/docs/api/util.html#util_util_promisify_original" rel="nofollow noreferrer">documentation</a> says </p>
  
  <blockquote>
    <p>Takes a function following the common error-first callback style, i.e.
    taking a <code>(err, value) =&gt; ...</code> callback as the last argument, and
    returns a version that returns promises.</p>
  </blockquote>
  
  <p>The IBM Watson callback is complicated and I can't figure out how to refactor it into the Node.js callback style. It's working, should I just ignore the error message? Here's my Google Cloud Function:</p>
  
  <pre class="lang-js prettyprint-override"><code>exports.IBM_T2S = functions.firestore.document('Users/{userID}/Spanish/IBM_T2S_Request').onUpdate((change) =&gt; {
  
      let word = change.after.data().word;
      let wordFileType = word + '.mp3';
  
      function getIBMT2S(word, wordFileType) {
        const {Storage} = require('@google-cloud/storage');
        const storage = new Storage();
        const bucket = storage.bucket('myProject.appspot.com');
        const file = bucket.file('Audio/Spanish/Latin_America/' + wordFileType);
        var util = require('util');
        var TextToSpeechV1 = require('watson-developer-cloud/text-to-speech/v1');
  
        var textToSpeech = new TextToSpeechV1({
          username: 'groucho',
          password: 'swordfish',
          url: 'https://stream.watsonplatform.net/text-to-speech/api'
        });
  
        var synthesizeParams = {
          text: word,
          accept: 'audio/mpeg',
          voice: 'es-LA_SofiaVoice',
        };
  
        const options = { // construct the file to write
          metadata: {
            contentType: 'audio/mpeg',
            metadata: {
              source: 'IBM Watson Text-to-Speech',
              languageCode: 'es-LA',
              gender: 'Female'
            }
          }
        };
  
        textToSpeech.synthesize(synthesizeParams).on('error', function(error) {
          console.log(error);
        }).pipe(file.createWriteStream(options))
        .on('error', function(error) {
          console.error(error);
        })
        .on('finish', function() {
          console.log("Audio file written to Storage.");
        });
      };
  
  var passGetIBMT2S = util.promisify(getIBMT2S(word, wordFileType))
  passGetIBMT2S(word, wordFileType)
  });
  </code></pre>