wt-cli: Getting error "Supplied code must return or export a function." on new deployments

Team, I recently started getting the error in runtime

{
  "code": 400,
  "message": "Invalid webtask code",
  "error": "Supplied code must return or export a function."
}

when I invoke the webtask. The webtask duly has the structure

const webtaskApi = module.webtask;
module.exports = function(e) {
}

What could be wrong?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

Thanks a bunch!!