Async and Await are not supporting in freshdesk app

  1. While using async/await function in the freshdesk app it was working fine when we use fdk run and throwing an error while using fdk pack.

I’m using the fdk version 7.0.0
node js version :12.22.6

  1. for example

const getData = async() => {
    var y = await "Hello World";
    console.log(y);
}
  
console.log(1);
getData();
console.log(2);

  1. error is “unexpected token” please find the screenshot


thanks
Prakash k

Thanks for reporting this @Konanki_Prakash.

I can reproduce this issue for frontend apps when running fdk validate (fdk pack internally calls validate). Serverless components work fine.

We have identified the issue and are working on releasing a fix soon. I’ll update you once a fix has been released. Thanks again for reporting this issue.

@Konanki_Prakash We have released a fix with fdk v7.0.1. You can update using:

npm install https://dl.freshdev.io/cli/fdk-7.0.1.tgz -g

Once updated, fdk pack should not throw errors for async functions and arrow operators.

We have also updated FDK v7.0 release announcement to reflect this change.

1 Like

Hi @kaustavdm ,
Thanks for the response.
after updating the fdk version i’m not getting any error but it was showing some warnings and not able to pack the app.

i’m trying to integrate sip library in my app. if it is required i can share my code with you.

thanks,
Prakash

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.