[fix] Throw error if the module isn't correctly exported