#Problem with importing TableColumn while using nuxt/ui-pro

8 messages · Page 1 of 1 (latest)

outer emberBOT
#

Hi @still sigil. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

narrow magnetBOT
#
.lilluz has been warned

Reason: Mass mention

outer emberBOT
#

Based on the information provided in the knowledge sources, I can help clarify your issue with importing the TableColumn type while using Nuxt UI Pro.

The problem you're experiencing is likely due to a change in how Nuxt UI Pro is set up in version 3. According to the Nuxt UI Pro Installation guide, Nuxt UI Pro now automatically includes Nuxt UI as a dependency. This means you don't need to install or import Nuxt UI separately.

Here's what you should do:

  1. Make sure you're using the latest version of Nuxt UI Pro. If you're not, update it:

    pnpm add @nuxt/ui-pro@next
    
  2. In your nuxt.config.ts, you should only need to include Nuxt UI Pro as a module:

    export default defineNuxtConfig({
      modules: ['@nuxt/ui-pro']
    })
    

    You don't need to extend @nuxt/ui-pro or include @nuxt/ui separately anymore.

  3. For importing types, instead of using @nuxt/ui, you should now use #ui-pro/types. Try changing your import statement to:

    <script setup lang="ts">
    import type { TableColumn } from '#ui-pro/types'
    </script>
    

This new import syntax is mentioned in the Nuxt UI Pro Installation guide under the TypeScript section.

If you're still encountering issues after making these changes, it might be worth checking if there are any conflicts with other configurations in your project, or if you need to clear your cache and reinstall dependencies.

#

Remember, Nuxt UI Pro v3 is still in alpha, so there might be some inconsistencies or bugs. If the problem persists, you may want to report it as an issue on the Nuxt UI Pro GitHub repository.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@still sigil Kapa.ai is still learning and improving, please let me know how I did by reacting below.

still sigil
#

@outer ember Module '"@nuxt/ui-pro/runtime/types/index.js"' has no exported member 'TableColumn'

outer emberBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

I apologize, but it seems there's a discrepancy in the information available about the TableColumn type in Nuxt UI Pro. The knowledge sources don't provide specific information about this error or the correct way to import TableColumn in Nuxt UI Pro.

However, based on the error message you're seeing, it appears that the TableColumn type is not being exported from the @nuxt/ui-pro package as expected. This could be due to recent changes in the package structure or a potential bug in the current version of Nuxt UI Pro.

Given that Nuxt UI Pro is built on top of Nuxt UI, you might try importing the TableColumn type directly from Nuxt UI instead. You can attempt this:

import type { TableColumn } from '#ui/types'

If this doesn't work, I recommend the following steps:

  1. Double-check that you're using the latest version of Nuxt UI Pro.
  2. Clear your project's cache and reinstall dependencies.
  3. If the issue persists, it would be best to report this as a bug to the Nuxt UI Pro team. You can do this by opening an issue on their GitHub repository.

I apologize that I couldn't provide a more definitive solution. The knowledge sources don't contain enough up-to-date information about this specific issue with the TableColumn type in Nuxt UI Pro.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: