Open toddeTV opened 6 months ago
I have the exact same issue. I hope it gets fixed soon!
This issue is stale because it has been open for 30 days with no activity.
I would like to add that this seems to happen due to the usage of Radio. I did not set ui.global
and yet still got exact same error. I guess setting global
to true just include everything including Radio so that it triggers build failure.
Environment
Global:
Project:
Version
v2.15.2
Reproduction
Reproduction with a prepared demo repository:
pnpm i
pnpm build
-> will now break with the provided errorReproduction without my linked demo repo, own example reproduction:
pnpm dlx nuxi@latest init issue-report-nuxt-ui-1748-tresjs-cientos-404 -t ui
withpnpm
as package manager (see NuxtUI starter project in installation guide for more information)cd
issue-report-nuxt-ui-1748-tresjs-cientos-404
pnpm i
(just to be sure)pnpm build
-> should work (just to test and be sure)Now lets add a small code that leads to the build error:
pnpm i -D @tresjs/nuxt @tresjs/cientos
In
nuxt.config.ts
: Add@tresjs/nuxt
to the modules & setglobal
totrue
in the NuxtUI settings.The nuxt config should then look something like this:
export default defineNuxtConfig({ devtools: { enabled: true }, modules: [ '@nuxt/ui', '@tresjs/nuxt', ], ui: { global: true, // this will break on
pnpm build
-> if set tofalse
|undefined
the build will work }, })pnpm build
-> will now break with the provided errorDescription
If the following criteria are met in the project, the build command
pnpm build
will fail with the error below.Criteria:
@tresjs/nuxt
is enabled in the project and present as dependency@tresjs/cientos
is present (enabling in TresJS nuxt module config is not needed)@nuxt/ui
is enabled in the project and present as dependencyglobal
is set totrue
Error:
Cannot use
pnpm build
bc the build fails with the following error:Additional context
To get the build working again, one of two things can be done:
global
toundefined
orfalse
, or removing it so that the defaultundefined
will be used in the background.@tresjs/cientos
(e.g.pnpm remove @tresjs/cientos
)But the combination I want in my project setup with build upon code cannot be built.
Logs
see above
Cross bug report
Because I am not sure whether this is a
@nuxt/ui
or@tresjs/cientos
issue and what falls under which jurisdiction, I reported this bug twice: