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

Component is missing template or render function #60

Open
waiylkarim opened this issue Oct 29, 2021 · 5 comments
Open

Component is missing template or render function #60

waiylkarim opened this issue Oct 29, 2021 · 5 comments

Comments

@waiylkarim
Copy link

Hello I'm trying to use vue-audi-recorder with Vue3 but I'm getting the following warning:

Component is missing template or render function

Base code:

<template>
    <div>
	  <audio-recorder
	    upload-url="YOUR_API_URL"
	    :attempts="3"
	    :time="2"></audio-recorder>
    </div>
</template>

<script>
	import AudioRecorder from 'vue-audio-recorder'

	export default {
		components: {
			AudioRecorder,
		}
	}
</script>

What am I missing?

Thank you!

@michaelchukwu
Copy link

Hello, did you find any solution to this?

@abhiramikc
Copy link

Any Luck with this issue ?

@waiylkarim
Copy link
Author

Seems like the project is dead!

@d4rkr3pt0r
Copy link

@waiylgeek That's SSR issue. Load it as follow:

<template>
    <div>
	<client-only>
        <audio-recorder/>
	</client-only>
    </div>
</template>
<script>
    import Vue from 'vue'
    let AudioRecorder
    if (process.client) {
        AudioRecorder = require('vue-audio-recorder')
        Vue.use(AudioRecorder)
    } else {
        AudioRecorder = { component: { template: '<div></div>' } }
    }
	export default {
	//
	}
</script>

@ShetlandJ
Copy link

I can't get the above solution to work in Vue 3 with Interia

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

5 participants