Radix direct auto-import breaking
Anyone has experience trouble using radix vue?
So I installed the module on my nuxt application and tried to use the library. No matter what i do and how many times i reinstall the library the app breakes with the next error:
7 Replies
Hi @IsaacR943. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
This is the component:
----------------------
Based on the information provided in the knowledge sources, I don't have specific details about Radix Vue or its integration with Nuxt. However, I can provide some general insights about auto-imports in Nuxt that might be relevant to your issue.
The error message you're seeing suggests that there's a problem with how the Radix Vue components are being imported. In Nuxt, there are specific ways to handle auto-imports, especially for third-party packages.
Here are a few suggestions based on Nuxt's auto-import functionality:
1. Check if there's a Nuxt module for Radix Vue. If there is, it might handle the auto-imports for you.
2. If there isn't a specific module, you might need to configure auto-imports for Radix Vue manually. You can do this in your
nuxt.config.ts
file. According to the Auto-import from Third-Party Packages (https://nuxt.com/docs/guide/concepts/auto-imports#auto-import-from-third-party-packages) documentation, you can set it up like this:
3. If auto-imports are not working, you might need to import the components explicitly. You can do this using the #components
alias, as mentioned in the Direct Imports (https://nuxt.com/docs/guide/directory-structure/components#direct-imports) documentation.
4. If the issue persists, you might need to add Radix Vue to the build.transpile
array in your Nuxt config, as suggested in the Transpiling Libraries (https://nuxt.com/docs/guide/concepts/esm#transpiling-libraries) section:
If these suggestions don't resolve your issue, you might need to check if there are any compatibility issues between the versions of Nuxt and Radix Vue you're using, or if there are any known issues with using Radix Vue in a Nuxt project.
Remember, these are general suggestions based on Nuxt's auto-import and module system. For specific issues with Radix Vue, you might need to consult their documentation or community forums.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@1223715160502571129> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Do you have more info to give? The
nuxt.config.ts
, package.json
? And have you tried the new radix-ui vue with RekaUI? @IsaacR943ended up doing my own component with claude
this sounds like a bug - perhaps nuxt is trying to protect against importing radix3