-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Build with errors #4690
Comments
I have found a lot of solutions to change the node version, but this cannot be achieved in a production environment |
I think the version update should not be a destructive update, at least you need to inform the user in advance through the console. I have also checked the issue. Many solutions are to change the node version, which I think is not feasible. |
Can you provide a reproduction? There are no breaking changes in v2.2 except for JIT mode, but you aren't using JIT mode based on your config file. Please use the issue template, right now it's impossible to help as there is way too much missing information + no actual reproduction I can clone to troubleshoot. |
@adamwathan I am also seeing this issue suddenly. I'm not 100% sure why undefined is being passed to the flattenColorPalette function in the first place (likely the primary issue), but I believe a filter to prevent non-truthy values from being processed by the function be a smart catch to put in place. Here is a reproduction repo you can spot the error in. Just try running https://github.com/coloradocolby/tw-repro Edit: I was able to get this repo working by generating a full tailwindcss config and slowly copying over previous customizations. From what I can tell there is nothing wrong with my previous config, so I've opened up a PR inside the repo so that you can see the differences between the working and non-working configs. https://github.com/coloradocolby/tw-repro/pull/1/files |
Ah the issue is the |
Hello, this is the warehouse where I have the error, thank you very much for helping me see this problem
|
I tried node version v14.17.1 and it didn't work either |
It can work, according to the way you gave, thank you very much
|
Our company is facing the same issue too. Everytime we build we get the warning. All we are doing though is importing Tailwind's colors in our config file and overwriting some of the defaults:
|
Until v3.0, I'm getting rid of this warn by doing this fix inside
|
reference (here)[tailwindlabs/tailwindcss#4690 (comment)]
these warnings also appears on v3
module.exports = {
theme: {
colors: ({ colors }) => ({
...colors,
}
}
}
|
Why was this issue closed? These warnings are definitely still around in v3 when requiring 'tailwindcss/colors'. |
|
I can't build when having plugins enabled in config.js ...
plugins: [require("@tailwindcss/ui"), require("@tailwindcss/forms")],
... |
For anyone who is spreading tailwind's full default colors into Tailwind has deprecated several color names and renamed them, but has left the deprecated names in the colors object for backwards compatibility. These deprecated colors will presumably be removed in a future version, at which point the warning will not show up. In the meantime, if you need to spread the full default color object into your const colors = require('tailwindcss/colors');
delete colors['lightBlue'];
delete colors['warmGray'];
delete colors['trueGray'];
delete colors['coolGray'];
delete colors['blueGray'];
module.exports = {
theme: {
colors: {
...colors,
green: {
//...overwritten color values
},
transparent: 'transparent'
}
} |
The things that fixed it for me was the last point from @Daynil const colors = require('tailwindcss/colors');
delete colors['lightBlue'];
delete colors['warmGray'];
delete colors['trueGray'];
delete colors['coolGray'];
delete colors['blueGray'];
module.exports = {
theme: {
colors: {
...colors,
green: {
//...overwritten color values
},
transparent: 'transparent'
}
}``` |
This fix the warns until Tailwind 3.0.24 |
just found this because we hit this issue. Deleting them in the config file seems a bit of a hack..... Also does not appear to be working on 3.0.24. still receiving the warnings |
In #11127 (comment), @wongjn posted a solution. Instead of including the original colors and spreading them, one can extend the colors instead. |
Yesterday, the compilation was still working in the production environment, but today it won’t work.
The text was updated successfully, but these errors were encountered: