-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: build fails when NuxtUI module prop global
is set to true
and TresJS with cientos is present
#404
Comments
BTW: // https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
// [...]
tres: {
modules: [
// '@tresjs/cientos', // <- not needed to encounter the problem
],
},
}) |
I'm also hitting the same error, even during development. Was able to reproduce that it seems like only once Appears to ONLY affect The error traces back to the same as yours above:
|
Currently hitting the same problem. |
The reason for this issue is an auto import name conflict. @tresjs/cientos provides That's why it only appears when using As nuxt/ui defines |
Describe the bug
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:Reproduction
https://github.com/toddeTV/issue-report-nuxt-ui-1748-tresjs-cientos-404
Steps to reproduce
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:
pnpm build
-> will now break with the provided errorHow to solve the bug
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.
System Info
Used Package Manager
pnpm
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:Code of Conduct
The text was updated successfully, but these errors were encountered: