You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Behavior
Babel parser gets confused when using decorators.
Additional context/Screenshots
Moduleparsefailed: Cannotusekeyword 'await' outside an async function (86:8)
You may need an appropriate loader to handle this file type.
| key: "t",
| value: function value() {
> await this.s();
| }
| }, {
@ ./src/index.js 7:13-40
As you can see await this.s() is within an async so there should be no problem.
Remove the decorator then the problem is gone immediately.
Hey @pirix-gh! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.
Bug Report
Current Behavior
Babel parser gets confused when using decorators.
Additional context/Screenshots
As you can see
await this.s()
is within anasync
so there should be no problem.Remove the decorator then the problem is gone immediately.
Input Code
Expected behavior/code
This is supposed to compile just fine.
Babel Configuration (.babelrc, package.json, cli command)
Environment
The text was updated successfully, but these errors were encountered: