I'm using back4app as backend service to deploy my app, developed in React Native ans JS. I'm testing how to use the 'Cloud Code Functions' of back4app right now...
As I'm a beginner in back4app, I found a problem while using their guide. I'm facing this message error: 'async functions' is only available in ES8 (use 'esversion: 8').
:
Back4app Side:
import Parse from 'parse/react-native.js';
import AsyncStorage from '@react-native-async-storage/async-storage';
//Initializing the SDK
Parse.setAsyncStorage(AsyncStorage);
//Paste below the Back4App Application ID AND the JavaScript KEY
Parse.initialize('YOUR_APPLICATION_ID_HERE', 'YOUR_JAVASCRIPT_KEY_HERE');
//Point to Back4App Parse API address
Parse.serverURL = 'https://parseapi.back4app.com/';
//This is a hello function and will log a message on the console
Parse.Cloud.define("hello", async (request) => {
console.log("Hello from Cloud Code!");
return "Hello from Cloud Code!";
});
my app:
const helloFunction = await Parse.Cloud.run("hello");
I know the problem comes from the asynchronous function, but I can't find any solution. What am I doing wrong?