You need to overwrite it as
module.exports = function() {}
Merely writing exports = function() {} creates a new local variables called exports and hides the exports variable living in module.exports
exports = function() {}
exports
module.exports