Open toddeTV opened 6 months ago
BTW:
It is not needed to enable @tresjs/cientos
in nuxt.config.ts
:
// 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 @tresjs/cientos
is installed (via package.json
) that the issue appears.
Appears to ONLY affect URadio
and URadioGroup
components, though? I'm able to use UAlert
, UButton
, UToggle
, etc. without any issues, and without any configuration in nuxt.config.ts
(no global
option defined).
The error traces back to the same as yours above:
The left-hand side of an assignment expression must be a variable or a property access
...node_modules/@nuxt/ui/dist/runtime/components/forms/Radio.vue:128:68
@nuxt/ui
: "^2.16.0-28594879.3b97563"@tresjs/cientos
: "^3.9.0"@tresjs/nuxt
: "^2.1.2"Currently hitting the same problem. Node: v20.9.0 Nuxt: 3.11.2 nuxt/ui: 2.17.0 tresjs/cientos: 3.9.0 tresjs/nuxt: 2.1.2 types/three: 0.165.0
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:
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 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