Skip to content

The environment created by vue-cli cannot determine the type of async function #3654

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

Closed
maclaren0920 opened this issue Mar 17, 2019 · 2 comments
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author

Comments

@maclaren0920
Copy link

Version

3.5.0

Reproduction link

#3653

Environment info

 System:
    OS: macOS 10.14.3
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
  Binaries:
    Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
    Yarn: 1.13.0 - ~/.nvm/versions/node/v10.15.3/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
  Browsers:
    Chrome: 73.0.3683.75
    Firefox: 65.0.1
    Safari: 12.0.3
  npmGlobalPackages:
    @vue/cli: 3.5.0

Steps to reproduce

mounted() {
let str = Object.getPrototypeOf(this.test1).constructor;
console.log(str); // ƒ Function() { [native code] }
},
methods: {
async test1() {

}

}

What is expected?

Solve this problem

What is actually happening?

Unable to determine type

@LinusBorg
Copy link
Member

LinusBorg commented Mar 17, 2019

Still no reproduction.

I realize there may be a language barrier. Sharing runnable code is all the more important.

@LinusBorg LinusBorg added the needs reproduction This issue is missing a minimal runnable reproduction, provided by the author label Mar 17, 2019
@haoqunjiang
Copy link
Member

haoqunjiang commented Mar 17, 2019

babel/babel#4691
babel/babel#7767
babel/babel#8642

Unless you turn off babel transpiling, there's no way to distinguish an async function from normal functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author
Projects
None yet
Development

No branches or pull requests

3 participants