I wrote this code in lib/helper.js
lib/helper.js
var myfunction = async function(x,y) { .... return [variableA, variableB] } exports.myfunction = myfunct
"await is only valid in async function"
But why? 'await' explicitly turns an async call into a synchronous call, and therefore the caller cannot be async (or asyncable) - at least, not because of the call being made at 'await'.