Skip to content

vue server can not use async/await #2648

Closed
@githoniel

Description

@githoniel

Version

3.0.4

Node and OS info

Node 8.11.4/ Npm 6.4.1 / Windows 10

Steps to reproduce

npm i @vue/cli @vue/cli-service-global -g

I got warning below

npm WARN babel-loader@8.0.4 requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.

then create a vue file index.vue

<template>
<div></div>
</template>
<script>
export default {
    methods: {
        async test(){}
    }
}
</script>

atfer run vue serve index.vue get compile error

 ERROR  Failed to compile with 1 errors                                                                     
This dependency was not found:

* regenerator-runtime/runtime in C:/Users/xxxx/AppData/Roaming/npm/node_modules/@vue/cli-service-global/node_modules/babel-loader/lib??ref--12-0!C:/Users/xxxx/AppData/Roaming/npm/node_modules/@vue/cli-service-global/node_modules/cache-loader/dist/cjs.js??ref--0-0!C:/Users/xxxx/AppData/Roaming/npm/node_modules/@vue/cli-service-global/node_modules/vue-loader/lib??vue-loader-options!./src/index.vue?vue&type=script&lang=js&

To install it, you can run: npm install --save regenerator-runtime/runtime   

What is expected?

vue serve support async/await

What is actually happening?

failed to compile

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions