Nuxt 4 + Nuxt UI Pro 3?
Hi all! Anybody else experiencing Nuxt 4 not wanting to start because it has issues with Nuxt-UI ?
It's a fairly empty boilerplate just consisting of Nuxt (4 now, came from 3), Nuxt UI Pro 3. Code worked on Nuxt 3, so I have '@nuxt/ui-pro' in my modules. I removed all build related artifacts, node_modules, npm cache, the whole 9 yards basically. Did I miss a crucial part of an upgrade guide going from Nuxt 3 to 4?
4 Replies
Hi @scorpie. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Your error is likely due to the fact that in Nuxt UI Pro v3, you should only include
@nuxt/ui-pro in your modules array—not @nuxt/ui. The @nuxt/ui-pro module automatically includes @nuxt/ui, so you do not need to install or add @nuxt/ui separately. If you have both in your modules or dependencies, it can cause the error you’re seeing.
How to fix:
1. Update your nuxt.config.ts:
Do not include @nuxt/ui in the modules array.
2. Update your dependencies:
In your package.json, you should only have:
Remove @nuxt/ui if it’s present.
3. Update your CSS import:
In your main CSS file (e.g., assets/css/main.css):
Do not import @nuxt/ui here; @nuxt/ui-pro includes it automatically.
This is a breaking change in Nuxt UI Pro v3, as it is now a module and no longer a layer, and it handles the inclusion of Nuxt UI internally. The official installation guide and migration guide both confirm this approach.
If you follow these steps and remove all references to @nuxt/ui from your config and dependencies, your Nuxt 4 + Nuxt UI Pro 3 project should start without this error.
For more details, see the Nuxt UI Pro installation guide and migration guide.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@236217621337341952> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
possibly a stupid question but is
@nuxt/ui or @nuxt/ui-pro installed?no stupid question, ui-pro is installed (which includes 'ui' according to the docs)