NPM code not workign

So i set up this code from braintree’s npm and my console is showing nothing. not even the console log “start”. It has something to do with the braintree.BraintreeGateway part. no code after that will work, can someone help explain? PS: i took out the api keys.

BACKEND CODE
import braintree from ‘braintree’;

export function Sale() {
var gateway = new braintree.BraintreeGateway({
environment: braintree.Environment.Sandbox,
merchantId: ‘hidden’,
publicKey: ‘hidden’,
privateKey: ‘hidden’,
});
console.log(“start”);
gateway.transaction.sale({
amount: ‘5.00’,
paymentMethodNonce: ‘nonce-from-the-client’,
options: {
submitForSettlement: true
}
}).then( function (result) {
console.log(“result”)
if (result.success) {
console.log('Transaction ID: ’ + result.transaction.id);
} else {
console.error(result.message);
}
}). catch(function (err) {
console.error(err);
});
}