-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError: await is only valid in async functions #1
Comments
But is supported in Node version later 14 |
Try adding "async" in front of the function keyword if you're using an older version of node js. Edit : sorry, you shouldn't add "async" before the function keyword as we are using another arrow function after that. |
v16.13.1 |
I am facing the same issue. Any solutions yet ? |
Faced The Same Problem, add async after "onRequest("
|
I'm new to javascript. Would someone mind explaining why only step 1 needs async? Do they others need it to in the arrow functions? |
I had to add async to all 3 functions for it to work |
I'm having the same issue, I'll try adding |
"Step 1" fails with error "SyntaxError: await is only valid in async functions and the top level bodies of modules":
Please help.
The text was updated successfully, but these errors were encountered: