N
Nuxt5mo ago
scorpie

Nuxt 4 + Nuxt UI Pro 3?

Hi all! Anybody else experiencing Nuxt 4 not wanting to start because it has issues with Nuxt-UI ?
> dev
> nuxt dev

Nuxt 4.0.1 with Nitro 2.12.3 nuxi 1:39:54 PM
1:39:54 PM
➜ Local: http://localhost:3000/
➜ Network: use --host to expose

ERROR Cannot start nuxt: Could not load @nuxt/ui. Is it installed? 1:39:55 PM
at loadNuxtModuleInstance (node_modules/@nuxt/kit/dist/index.mjs:2575:9)
at installModule (node_modules/@nuxt/kit/dist/index.mjs:2486:73)
at setup (node_modules/@nuxt/ui-pro/dist/module.mjs:31:13)
> dev
> nuxt dev

Nuxt 4.0.1 with Nitro 2.12.3 nuxi 1:39:54 PM
1:39:54 PM
➜ Local: http://localhost:3000/
➜ Network: use --host to expose

ERROR Cannot start nuxt: Could not load @nuxt/ui. Is it installed? 1:39:55 PM
at loadNuxtModuleInstance (node_modules/@nuxt/kit/dist/index.mjs:2575:9)
at installModule (node_modules/@nuxt/kit/dist/index.mjs:2486:73)
at setup (node_modules/@nuxt/ui-pro/dist/module.mjs:31:13)
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
kapa.ai
kapa.ai5mo ago
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:
export default defineNuxtConfig({
modules: ['@nuxt/ui-pro'],
css: ['~/assets/css/main.css']
})

export default defineNuxtConfig({
modules: ['@nuxt/ui-pro'],
css: ['~/assets/css/main.css']
})

Do not include @nuxt/ui in the modules array. 2. Update your dependencies: In your package.json, you should only have:
{
"dependencies": {
"@nuxt/ui-pro": "^3.0.0"
}
}

{
"dependencies": {
"@nuxt/ui-pro": "^3.0.0"
}
}

Remove @nuxt/ui if it’s present. 3. Update your CSS import: In your main CSS file (e.g., assets/css/main.css):
@import "tailwindcss";
@import "@nuxt/ui-pro";

@import "tailwindcss";
@import "@nuxt/ui-pro";

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: ----------------------
kapa.ai
kapa.ai5mo ago
<@236217621337341952> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
ViipeR
ViipeR5mo ago
possibly a stupid question but is @nuxt/ui or @nuxt/ui-pro installed?
scorpie
scorpieOP5mo ago
no stupid question, ui-pro is installed (which includes 'ui' according to the docs)

Did you find this page helpful?