TypeError: makeLoginDb is not a function while exporting a function using module.exports code example Example: how to export module in node js module.exports ={ //functions }