Javascript neo4j-driver and async function

Up to now,
I managed to have my function that run the queries being able to return a result immediately.
so the structure of my functions where
var session = driver.session();
return session.run([QUERY]).then(result=> return result.record.map ....)

I now have a bigger query and maybe for that reason, I end up having the query function return a Premise
I switched then to an async function with the following structure

var session = driver.session();
await session.run([QUERY]).then(result=> results= result.record.map ....)
return results

But then I get regeneratorRuntime is not defined at runtime in the console of the browser.

As environment config, I have the one of the sampe movies-javascript-bolt-master

Thank You

You cab do something like this

let query = 'query'
let param = {params }

try {
  const result = await session.run(query, param)
  if (result.records.length != 0) {
    console.log('operation successful ')

  } else {
    console.log('operation did not return any result ')

  }
} catch (error) {

  console.log('exception occure', error)
  throw error;
} finally {
  await session.close()
}