Yes
The issue appeared right after creating an app.
node -v: 8.9.4npm -v: 5.6.0yarn -v: 1.3.2npm ls react-scripts (if you haven鈥檛 ejected): [email protected]Then, specify:
(Write your steps here:)
yarn create react-app reproducing-appcd reproducing app && yarn add [email protected]async function* something() { } to index.jsyarn startThe app starts, the code is compiled, async generators are transpiled using babel-preset-env
As reported in https://github.com/facebook/create-react-app/issues/3815#issuecomment-375399832:
Failed to compile.
./src/App.js
Syntax error: /Users/alexey/xxx/src/App.js: Support for the experimental syntax 'asyncGenerators' isn't currently enabled (25:15):
23 |
24 |
> 25 | async function* Act() {
| ^
26 |
27 | }
28 |
Add @babel/plugin-proposal-async-generator-functions (https://git.io/vb4yp) to the 'plugins' section of your Babel config to enable transformation.
I'm working on PR #4222, add @babel/plugin-proposal-async-generator-functions to support async generator function.
This has been fixed in babel 7.0.0-beta.46. We've upgraded our version of babel and will be releasing a new alpha of react-scripts 2.0 soon.
Most helpful comment
I'm working on PR #4222, add
@babel/plugin-proposal-async-generator-functionsto support async generator function.