title: Unexpected token await in React Native
body: <p>I tried to get the latest babel/babylon packages that support the <code>await</code> token, but I still see the same error.</p>
  
  <p>The cause of the error might be that <code>await</code> is inside the <code>map()</code> function and it is outside of the original function scope.</p>
  
  <p>What am I missing in the configuration?</p>
  
  <p>index.js:   </p>
  
  <pre><code>async getLocations(locations) {
         var annotations = locations.map(function(location) {
             try {
                 let res = await Geocoder.geocodeAddress(location.address);
                 console.log(res);
                 console.log(res[0].position);
             }
             catch(err) {
                 console.log(err);
             }
             return (
                 {
                     latitude: res[0].position.lat,
                     longitude: res[0].position.lng
                 }
             );
         });
  }
  </code></pre>
  
  <p>console:</p>
  
  <pre><code>transformed 1/2 (50%)[node-haste] Encountered an error while persisting cache:
  &gt; SyntaxError: /Users/user/Developer/ReactProject/index.js: Unexpected token (122:25)
  &gt;   120 |      var annotations = inspections.map(function(inspection) {
  &gt;   121 |        try {
  &gt; &gt; 122 |          let res = await Geocoder.geocodeAddress(address);
  &gt;       |                          ^
  &gt;   123 | 
  &gt;   124 |           console.log(res);
  &gt;   125 |           console.log(res[0].position);
  &gt;     at Parser.pp.raise (/Users/user/Developer/ReactProject/node_modules/babylon/lib/parser/location.js:22:13)
  &gt;     at Parser.pp.unexpected (/Users/user/Developer/ReactProject/node_modules/babylon/lib/parser/util.js:89:8)
  &gt;     at Parser.pp.parseAwait (/Users/user/Developer/ReactProject/node_modules/babylon/lib/parser/expression.js:1082:10)
  &gt;     at Parser.pp.parseExprAtom (/Users/user/Developer/ReactProject/node_modules/babylon/lib/parser/expression.js:423:25)
  &gt;     at Parser.pp.parseExprSubscripts (/Users/user/Developer/ReactProject/node_modules/babylon/lib/parser/expression.js:277:19)
  &gt;     at Parser.pp.parseMaybeUnary (/Users/user/Developer/ReactProject/node_modules/babylon/lib/parser/expression.js:257:19)
  &gt;     at Parser.pp.parseExprOps (/Users/user/Developer/ReactProject/node_modules/babylon/lib/parser/expression.js:188:19)
  &gt;     at Parser.pp.parseMaybeConditional (/Users/user/Developer/ReactProject/node_modules/babylon/lib/parser/expression.js:165:19)
  &gt;     at Parser.pp.parseMaybeAssign (/Users/user/Developer/ReactProject/node_modules/babylon/lib/parser/expression.js:128:19)
  &gt;     at Parser.pp.parseVar (/Users/user/Developer/ReactProject/node_modules/babylon/lib/parser/statement.js:601:24)
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>  "dependencies": {
      "babel": "^6.5.2",
      "babel-core": "^6.1.2",
      "babel-plugin-transform-runtime": "^6.1.2",
      "babel-polyfill": "^6.9.1",
      "babel-preset-es2015": "^6.1.2",
      "babel-preset-stage-0": "^6.1.2",
      "babel-preset-stage-3": "^6.11.0",
      "babylon": "^6.8.2",
      "react": "^15.1.0",
      "react-native": "0.27.2",
    },
  </code></pre>
  
  <p>.babelrc:</p>
  
  <pre><code>{
    "presets": [ "es2015", "stage-3" ]
  }
  </code></pre>