How to broadcast transaction?

When I try to run npm install bitcore-explorers or bitcore-insight to broadcast my transaction I get the error:

Failed to load function definition from source: Failed to generate manifest from function source: Error: More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.

My code (for firebase functions) (I have tried many combinations of the .broadcast):

const bitcoin = require(“bitcore-lib”);

functions.https.onCall((data, context) => {
const utxo = {
“txId”: data.txId,
“outputIndex”: data.outputIndex,
“satoshis”: (data.satoshis),
“address”: data.address,
“script”: data.script,
const privateKey = data.privateKey;

const transaction = new bitcoin.Transaction()
.to(“bc1qjqh3ds0tc9slxhu6pl2au6ujwh4qxeu5z4nd04”, utxo.satoshis-1600)
bitcoin.Transaction.broadcast(transaction.toString(), (error, txid) => {
if (error) {
return error;
} else {
// Your Transaction Id