Async functions are called somewhere in the future, so even if you hoist values from the async function to the outer scope, they won’t be defined.
Move all stuff needing access to the async part into the async function.