Not sure what I am missing. Following the instructions here: https://github.com/mzabriskie/axios/blob/master/COOKBOOK.md
I have npm installed both axios and npm install axios promise.prototype.finally --save
.
I am using Gulp with Browserify.
var axios = require('axios');
require('promise.prototype.finally');
axios.get('http://google.com').finally(function(){
console.log('test');
});
Error:
app-7ee90adab7.js:18780 Uncaught TypeError: axios.get(...).finally is not a function
Update: This makes it work but do I need to do this?
var promiseFinally = require('promise.prototype.finally');
promiseFinally.shim();