react-scripts@2.0.0-next: babel-preset-env configuration issues
Created by: alexeyraspopov
Is this a bug report?
Yes
Did you try recovering your dependencies?
The issue appeared right after creating an app.
Environment
-
node -v
:8.9.4
-
npm -v
:5.6.0
-
yarn -v
:1.3.2
-
npm ls react-scripts
(if you haven’t ejected):react-scripts@2.0.0-next.b2fd8db8
Then, specify:
- Operating system: macOS Sierra
- Browser and version (if relevant):
Steps to Reproduce
(Write your steps here:)
yarn create react-app reproducing-app
cd reproducing app && yarn add react-scripts@2.0.0-next.b2fd8db8
- Add
async function* something() { }
toindex.js
yarn start
Expected Behavior
The app starts, the code is compiled, async generators are transpiled using babel-preset-env
Actual Behavior
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.