You are mixing ES imports with CommonJS – at bottom of file you have module.exports = api;
which is CJS terminology. The ES module equivalent is:
export default api
You are mixing ES imports with CommonJS – at bottom of file you have module.exports = api;
which is CJS terminology. The ES module equivalent is:
export default api