I am trying to use firebase cloud functions to store data on IPFS. I was able to install ipfs-mini package.
const IPFS = require('ipfs-mini');
const ipfs = new IPFS({ host: 'ipfs.infura.io', port: 5001, protocol: 'https' });
ipfs.add("testdata")
.then(function(result){
response.send(result);
})
.catch(function (err) {
response.send(err)
})
However I get error as in screenshot