babel: [babel-runtime] await is a reserved word failure on asyncGenerator.js
Bug
Webpack compilation now fails. It appears that asyncGenerator.js
names a function await
and that is now a failure with the most recent babel release. This appears to be generated from a babel-helpers template.
/node_modules/babel-runtime/helpers/asyncGenerator.js
Module build failed: SyntaxError: await is a reserved word (122:20)
120 | };
121 | },
> 122 | await: function await(value) {
| ^
123 | return new AwaitValue(value);
124 | }
125 | };
yarn list babel-runtime babel-helpers yarn list v0.24.6
├─ babel-helpers@6.24.1
├─ babel-runtime@6.23.0
└─ es-collections@0.0.2
└─ babel-runtime@5.8.38
Input Code
Not applicable, failing on babel-runtime itself.
Babel Configuration (.babelrc, package.json, cli command)
{
"presets": [
[
"env",
{
"targets": {
"browsers": "> 5%"
},
"modules": false,
"debug": true
}
],
"stage-2",
"react"
],
"plugins": [
"react-hot-loader/babel",
["relay", {"compat": true, "schema": "./schema.json"}],
"transform-flow-strip-types",
["lodash", { "id": ["lodash", "recompose"] }]
],
"env": {
"development": {
"sourceMaps": "inline"
}
}
}
Expected Behavior
Doesn’t fail on babel-runtime
Current Behavior
Webpack compile fails as indicated above
Your Environment
software | version(s) |
---|---|
Babel-core | 6.25.0 |
node | 8.1.2 |
yarn | 0.24.6 |
Operating System | OSX |
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 10
- Comments: 15 (5 by maintainers)
Happens when async/await is used incorrectly.
@purefan Betelgeuse
Now I get this with babili-webpack-plugin.
It is an error that babel-runtime was not released in sync with the other 0.6.25 babel packages. This is really causing a headache for myself and others. Any attention to this matter is greatly appreciated.