Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants