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

TypeError: Function(...) is not a function #381

Open
wangkangquan opened this issue Nov 18, 2019 · 1 comment
Open

TypeError: Function(...) is not a function #381

wangkangquan opened this issue Nov 18, 2019 · 1 comment

Comments

@wangkangquan
Copy link

  • version: 0.13.3
  • condition:use regenerator-runtime in uni-app project

my code

<template>
    <div class="demo"></div>
</template>
<script>
export default {
    components: { },
    data() {
        return {};
    },
    mounted() {
        this.test1();
    },
    methods: {
        async test1() {
            const msg = await this.test2();
            console.log('============ ', msg);
        },
        test2() {
            return new Promise(resolve => {
                setTimeout(() => {
                    resolve('hello');
                }, 2000);
            });
        }
    }
};
</script>
<style lang="scss" scoped>
</style>

raise an error that says

TypeError: Function(...) is not a function
    at Object.cf (http://127.0.0.1:64467/index.worker.js?t=1574069625913:3851:46)
    at c (http://127.0.0.1:64467/index.worker.js?t=1574069625913:2020:91)
    at Object.a34a (http://127.0.0.1:64467/index.worker.js?t=1574069625913:3854:17)
    at c (http://127.0.0.1:64467/index.worker.js?t=1574069625913:2020:91)
    at Object.b2f (http://127.0.0.1:64467/index.worker.js?t=1574069625913:4619:89)
    at c (http://127.0.0.1:64467/index.worker.js?t=1574069625913:2020:91)
    at Module._ (http://127.0.0.1:64467/index.worker.js?t=1574069625913:4679:20)
    at c (http://127.0.0.1:64467/index.worker.js?t=1574069625913:2020:91)
    at Module.e (http://127.0.0.1:64467/index.worker.js?t=1574069625913:4669:13)
    at c (http://127.0.0.1:64467/index.worker.js?t=1574069625913:2020:91)

I've found that if change the version of "0.12.1" , this program is functioning well now

@bwindels
Copy link

bwindels commented Feb 4, 2021

Duplicate of #378 ?

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

2 participants