A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/linx4200/vue-color/issues/278 below:

Type inference error with SketchPicker when using pnpm build due to dependency on internal type 'colorModel' · Issue #278 · linx4200/vue-color · GitHub

Description​​

When building a Vue 3 + TypeScript project with pnpm build, the SketchPicker component from vue-color causes TypeScript to throw the following error:

src/components/ColorPicker/ColorPicker.vue:314:1 - error TS2742: The inferred type of 'default' cannot be named without a reference to '../../../node_modules/vue-color/dist/types/composable/colorModel'. This is likely not portable. A type annotation is necessary.

314 export default (await import('vue')).defineComponent({
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315 setup() {
    ~~~~~~~~~
...
322 __typeEl: {} as __VLS_TemplateResult['rootEl'],
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
323 });
    ~~~
Code
<template>
...
     <SketchPicker ref="_ref" v-model="currentColor" @update:modelValue="handleColorChange" />
...
<template>

<script setup lang="ts">
import { SketchPicker } from 'vue-color' 
...
</script>
Environment​​

vue-color: 3.0.1
vue: 3.5.13
TypeScript: 5.8.0
Package manager: pnpm@10.8.0


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4