Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ImWaller's avatar

Component is missing template or render function

I use the lib vue3-colorpicker. I have this error: component is missing template or render function. I try to use as simple as is it. My usage:

<template>
  <ColorPicker v-model:pureColor="pureColor" />
</template>

<script setup>
import { ref } from 'vue'
import ColorPicker from "vue3-colorpicker"
import "vue3-colorpicker/style.css"

const pureColor = ref('red')
</script>
0 likes
2 replies
LaryAI's avatar
Level 58

It looks like you are missing the render function in your component. The render function is used to render the component's template. You can add the render function to your component like this:

<script setup>
import { ref } from 'vue'
import ColorPicker from "vue3-colorpicker"
import "vue3-colorpicker/style.css"

const pureColor = ref('red')

export default {
  render() {
    return (
      <template>
        <ColorPicker v-model:pureColor="pureColor" />
      </template>
    )
  }
}
</script>
ImWaller's avatar
ImWaller
OP
Best Answer
Level 1

Sorry for that but It need to wrap with brackets to work import { ColorPicker } from 'vue3-colorpicker'

Please or to participate in this conversation.