#Not able to use Import Types / Complex Types with New Nuxt Version

2 messages · Page 1 of 1 (latest)

soft prism
#

I upgraded my Nuxt Version and even created a project from ground to test this new feature of Vue 3.3.3+ but it seems to not work with Nuxt (I tried the same exact example with Vue Pure and it worked just fine).

Here is the example that I'm testing:

<script setup lang="ts">
    import {TestProps, SpecificProp} from '../types'
    type MergedProps = TestProps & Omit<SpecificProp, 'id'>;
    const props = defineProps<MergedProps>();
</script>

It does not work, when I try to run the project if gives the following error:
ERROR Cannot read properties of undefined (reading 'sys')

Shouldn't it be working since Nuxt is already using Vue 3.3.3+?

fluid plaza
#

Make sure you update vue and not just nuxt, and for me at least, I have to import the types from a file within the component directory