Skip to content
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

Async/Await Broken In Default Config #1012

Closed
stolinski opened this issue Mar 19, 2018 · 6 comments
Closed

Async/Await Broken In Default Config #1012

stolinski opened this issue Mar 19, 2018 · 6 comments

Comments

@stolinski
Copy link

Version

3.0.0-beta.6

Reproduction link

https://github.com/stolinski/vueBrokenAsync

Steps to reproduce

npm run serve

check console.

async code is added to HelloWorld.vue

What is expected?

Async method to be recognized as a function.

What is actually happening?

Runtime errors stating "TypeError: this.fetchData is not a function"


Also unexpected token errors in eslint. This same code works out of box with the CLI v2 and no mods to the .babelrc file

@stolinski
Copy link
Author

I'm dumb. Please ignore.

@johndatserakis
Copy link

What was it in the end?

@stolinski
Copy link
Author

It was a typo. I had "method" as my methods object property instead of "methods"

@johndatserakis
Copy link

Ok got it, thanks. Asking because all of a sudden this morning I updated my project (which was using beta 1 I believe) and now I'm getting all types of weird errors like 'process' is not defined, 'require' is not defined, and Parsing error: Unexpected token after async/await usage - trying to figure out what happened. Thanks for getting back.

@Akryum
Copy link
Member

Akryum commented May 30, 2018

If you are using typescript, make sure to check your tsconfig (especially the compiler options - look at libs).

@johndatserakis
Copy link

Thank you for the suggestion @Akryum. Definitely a tough issue - I searched hard for a while today and couldn't find anyone mentioning such weird issues.

In the end I found the issue! I had initialized the project using vue-cli 3 beta 1, and had upgraded the vue-cli on my system and project to vue-cli beta 15 - it was the eslint configs! After scouring a project made with vue-cli beta 15 I found a small difference in the eslint section of the package.json. There was a small definition that wasn't allowing the webpack variables to come through in the app (at least eslint thought so.)

Thank you both for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants