-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Unexpected token function, when use async in Node 7.2 #1161
Comments
The common mistake is not including the correct Babel plugin if you don't use the AVA defaults. |
Thanks for the reply! But, with Node 7, I can run async/await without any babel plygin. I do run the code with Node(without plugin), and it works. The problem is that I can run with the same code with Node 7, but I cannot run it with avajs. |
As far as I can tell Node.js 7 currently ships with V8 5.4, and async / await is only in 5.5: http://v8project.blogspot.co.za/2016/10/v8-release-55.html. How are you managing this? |
I encountered similar problems,with Node 7, I can run async/await,but ava: |
@cliguo |
v8 5.4 have async functions when use --harmony-async-await |
Ava |
To clarify, you mean the |
@novemberborn yep |
Ah cool. Then yea, that makes sense. Your workaround is good, though honestly I think folks should stick to Babel until |
Thanks for the reply @EduardoRFS , I will try it later ;) |
Finally back to work :D, I tried @EduardoRFS and it works!
|
check this link : |
In my case, I try to run without babel, so I use node v7.2.0
in my source code:
But I got the following error
The text was updated successfully, but these errors were encountered: