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
for example
const getData = async() => {
var y = await "Hello World";
console.log(y);
}
console.log(1);
getData();
console.log(2);
error is “unexpected token” please find the screenshot
thanks
Prakash k
kaustavdm
(Kaustav Das Modak)
September 24, 2021, 4:54am
2
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.
kaustavdm
(Kaustav Das Modak)
September 24, 2021, 5:55am
3
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.
kaustavdm
(Kaustav Das Modak)
September 24, 2021, 9:10am
4
@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
system
(system)
Closed
September 30, 2021, 4:50pm
6
This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.