title: Script that change twitter profile picture
body: <p>I'm using <a href="https://github.com/draftbit/twitter-lite" rel="nofollow noreferrer">twitter-lite library</a> and I want to update a Twi profile picture.</p>
  <p>At the moment I'm trying this :</p>
  <pre><code>var fs = require('fs');
  var Twit = require('twitter-lite'); 
  
  var T = new Twit({
    consumer_key:         '',
    consumer_secret:      '',
    access_token:         '',
    access_token_secret:  ''
  });
  
  var image64str = fs.readFileSync('kitten.jpg', {encoding: 'base64'});
  
  T.post('account/update_profile_image', { image: image64str }, function(err) {
    if(err) {console.error(err); return;}
    console.log('done');
  });
  </code></pre>
  <p>But I get the following error :</p>
  <p><em>/Users/huyvunguyen/node_modules/node-fetch/lib/index.js:272
  return Body.Promise.reject(new FetchError(<code>invalid json response body at ${_this2.url} reason: ${err.message}</code>, 'invalid-json'));
  ^
  FetchError: invalid json response body at <a href="https://api.twitter.com/1.1/account/update_profile_image.json" rel="nofollow noreferrer">https://api.twitter.com/1.1/account/update_profile_image.json</a> reason: Unexpected end of JSON input
  at /Users/huyvunguyen/node_modules/node-fetch/lib/index.js:272:32
  at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  type: 'invalid-json'
  }</em></p>
  <p>Anyone know how can I debug this ?</p>