Open guirak opened 2 months ago
@ineshbose could I ask your opinion on this? Isn't it related to the recent tailwind's module changes?
Hello,
Yes it seems to be the problem, I have tested forcing the old version :
"pnpm": {
"overrides": {
"@nuxtjs/tailwindcss": "6.11.4"
}
},
And it's working well ! :)
This change has impacted all my git historical. Olds version and prod versions was not building anymore without changing the version of Nuxt/UI dependencies. The explanation that what it was working locally but not in Docker was the presence of the pnpm-lock.yaml in my docker ignore. :X
Hi! Yes this will likely be due to changes in 6.12.0 - so I'll be pushing a fix for it in 6.12.1, but would ask you to downgrade for now as you have!
May I ask your use-case here, i.e, are you authoring a module or is it a module within your project?
In any case, safelist regexes and tailwind plugins shouldn't be passed from the hook, and you should use a separate config file for that. Depending on your use case there are multiple approaches to do this, but first #1665 would need merging!
Hi ineshbose,
Yes, staying in 6.11.4 it's a good workaround for me.
It's a module within my project. I have decomposed the project in several nuxt module to be reusable by several apps. One of them is considered as the graphical framework. It is direct dependent to nuxt ui and provide all the components, composable and configuration for all the apps of the project.
I have put inside the configuration of tailwind to avoid to repeat it on all apps. Thanks to this issue, I have modified how I define this configuration since last day. Now I'm defining a tailwind.config.ts and an app.config.ts files in the graphical framework module and link to them in the app :
// tailwind.config.ts in apps
import {webuiTailwindConfig} from "../../ui/mmione-webui-fwk/src/runtime/config/tailwind.config"
export default webuiTailwindConfig
// app.config.ts in apps
import {webuiAppConfig} from "@mmiUIFwk/config/app.config"
export default webuiAppConfig
Hi ineshbose,
Yes, staying in 6.11.4 it's a good workaround for me.
It's a module within my project. I have decomposed the project in several nuxt module to be reusable by several apps. One of them is considered as the graphical framework. It is direct dependent to nuxt ui and provide all the components, composable and configuration for all the apps of the project.
I have put inside the configuration of tailwind to avoid to repeat it on all apps. Thanks to this issue, I have modified how I define this configuration since last day. Now I'm defining a tailwind.config.ts and an app.config.ts files in the graphical framework module and link to them in the app :
// tailwind.config.ts in apps import {webuiTailwindConfig} from "../../ui/mmione-webui-fwk/src/runtime/config/tailwind.config" export default webuiTailwindConfig
// app.config.ts in apps import {webuiAppConfig} from "@mmiUIFwk/config/app.config" export default webuiAppConfig
Should consider using layers!
Environment
Version
2.15.2
Reproduction
https://github.com/guirak/NuxtUi_TailwindColorStuck
Description
Hello,
I have first created the issue here but after investigation, it seems to be a better place in the @nuxt/ui repository
I have a monorepos nuxt project with a nuxt module based on Nuxt/UI.
Yesterday, I have runned my job that build the project for production and I'm encountering an issue when running the dev:prepare in my module that depends of Nuxt/UI : the task stay stuck. Here is my module code :
When disabling the hook tailwindcss, the task doesn't stuck anymore and finish correctly.
Looking forward, the problem is caused by the assignment of the
tailwindConfig.theme.extend.colors
done in the function called by the hook :Commenting all the codes that concern the
tailwindConfig.theme.extend.colors
, there is no more stuck but the following error at the end of the pnpm run dev:prepare task :Commenting the hook, there is no more problem and all is building correctly
I haven't changed anything about this tailwindConfig.ts file, this code was working 4 days ago and since several months.
The environment that have the problem is based in a docker image node:21.7.1-slim, I use pnpm to install. There is a new version of pnpm since yesterday and maybe can explain the problem as I haven't put restriction on the pnpm version to use. But I have tested forcing the old version (pnpm@8.15.7) and the problem is still present.
I don't encounter the problem when building without the docker environment even if I use the last pnpm version.
I have tested in old commits of my git repos (versions that was working well : 1 month ago and another that build correctly the 14th april) and I have the same problem on them now. I have versioned the package lock so it's seems not to be a dependency problem.
To summarize, the problem occurs only in the docker environment (which the source image has not changed) and is present since a date between the 14th and the 17th april. It's not related to dependencies as I have the pnpm lock file that as not changed and old code is encountering the problem and seems not be related to pnpm version as forcing the version to oldest don't solve the problem.
I understand that is a very specific problem and hard to found a root cause with these explanations but maybe someone can found in my code something bad written or can give me an explanation about what the assignment of tailwindConfig.theme.extend.colors is causing the stuck.
Thank you.
Additional context
No response
Logs
No response