Build with errors
Yesterday, the compilation was still working in the production environment, but today it won’t work.
> vue-cli-service build
⠦ Building for production...warn - As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`.
warn - Please update your color palette to eliminate this warning.
⠧ Building for production...
ERROR Failed to compile with 2 errors 5:51:20 ├F10: PM┤
error in ./src/style/index.css
TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at Array.forEach (<anonymous>)
at new Promise (<anonymous>)
@ ./src/main.js 20:0-27
@ multi ./src/main.js
error in ./src/assets/fonts/font.css
TypeError: getProcessedPlugins is not a function
at new Promise (<anonymous>)
@ ./src/main.js 22:0-33
@ multi ./src/main.js
package.json
{
"name": "h5",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build:test": "vue-cli-service build --mode test",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"babel-plugin-transform-remove-console": "^6.9.4",
"core-js": "^3.6.5",
"lodash": "^4.17.21",
"nprogress": "^0.2.0",
"vant": "^2.12.19",
"vconsole": "^3.7.0",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vue-scrollto": "^2.20.0",
"vuex": "^3.4.0",
"weixin-js-sdk": "^1.6.0"
},
"devDependencies": {
"@tailwindcss/postcss7-compat": "^2.1.2",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"autoprefixer": "^9.8.6",
"babel-eslint": "^10.1.0",
"babel-plugin-import": "^1.13.3",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"node-sass": "^5.0.0",
"postcss": "^7.0.35",
"postcss-px-to-viewport": "^1.1.1",
"sass": "^1.32.12",
"sass-loader": "^10.1.1",
"style-loader": "^2.0.0",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.1.2",
"vue-template-compiler": "^2.6.11"
}
}
tailwind.config.js
const colors = require('tailwindcss/colors')
module.exports = {
purge: [
'./src/**/*.html',
'./src/**/*.vue',
'./public/**/*.html'
],
presets: [],
darkMode: false, // or 'media' or 'class'
theme: {
screens: {
sm: '640px',
md: '768px',
lg: '1024px',
xl: '1280px',
'2xl': '1536px',
},
colors: {
transparent: 'transparent',
current: 'currentColor',
black: colors.black,
white: colors.white,
red: colors.red,
gray: colors.gray,
blueGray: colors.blueGray,
coolGray: colors.coolGray,
trueGray: colors.trueGray,
orange: colors.orange, // 橙色
amber: colors.amber, // 琥珀黄色
yellow: colors.yellow,
green: colors.green,
cyan: colors.cyan, // 青色
lightBlue: colors.lightBlue, // 淡青,亮蓝
blue: colors.blue,
indigo: colors.indigo, // 蓝紫
violet: colors.violet, // 粉紫
purple: colors.purple,
pink: colors.pink,
rose: colors.rose, // 粉红色
baseColor: '#55CCC1',
fromBase: '#A6F9D9',
baseGreen: '#EEFAF9',
baseOrange: '#FF9001',
baseGray: '#999',
baseRed: '#FF5050',
baseBlue: '#3E87FF',
basePlaceholder: '#ccc',
baseBg: '#F5F5F5',
base2: '#222',
base3: '#333',
base6: '#666',
base7: '#777'
},
spacing: {
px: '1px',
53: '53px',
314: '314px',
198: '198px',
0: '0px',
0.5: '0.125rem',
1: '0.25rem',
1.5: '0.375rem',
2: '0.5rem',
2.5: '0.625rem',
3: '0.75rem',
3.5: '0.875rem',
4: '1rem',
4.5: '1.125rem',
5: '1.25rem',
6: '1.5rem',
7: '1.75rem',
8: '2rem',
9: '2.25rem',
10: '2.5rem',
11: '2.75rem',
12: '3rem',
14: '3.5rem',
16: '4rem',
20: '5rem',
24: '6rem',
28: '7rem',
32: '8rem',
36: '9rem',
40: '10rem',
44: '11rem',
48: '12rem',
52: '13rem',
56: '14rem',
60: '15rem',
64: '16rem',
72: '18rem',
80: '20rem',
96: '24rem',
},
animation: {
none: 'none',
spin: 'spin 1s linear infinite',
ping: 'ping 1s cubic-bezier(0, 0, 0.2, 1) infinite',
pulse: 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
bounce: 'bounce 1s infinite',
},
backdropBlur: (theme) => theme('blur'),
backdropBrightness: (theme) => theme('brightness'),
backdropContrast: (theme) => theme('contrast'),
backdropGrayscale: (theme) => theme('grayscale'),
backdropHueRotate: (theme) => theme('hueRotate'),
backdropInvert: (theme) => theme('invert'),
backdropOpacity: (theme) => theme('opacity'),
backdropSaturate: (theme) => theme('saturate'),
backdropSepia: (theme) => theme('sepia'),
backgroundColor: (theme) => theme('colors'),
backgroundImage: {
none: 'none',
'gradient-to-t': 'linear-gradient(to top, var(--tw-gradient-stops))',
'gradient-to-tr': 'linear-gradient(to top right, var(--tw-gradient-stops))',
'gradient-to-r': 'linear-gradient(to right, var(--tw-gradient-stops))',
'gradient-to-br': 'linear-gradient(to bottom right, var(--tw-gradient-stops))',
'gradient-to-b': 'linear-gradient(to bottom, var(--tw-gradient-stops))',
'gradient-to-bl': 'linear-gradient(to bottom left, var(--tw-gradient-stops))',
'gradient-to-l': 'linear-gradient(to left, var(--tw-gradient-stops))',
'gradient-to-tl': 'linear-gradient(to top left, var(--tw-gradient-stops))',
},
backgroundOpacity: (theme) => theme('opacity'),
backgroundPosition: {
bottom: 'bottom',
center: 'center',
left: 'left',
'left-bottom': 'left bottom',
'left-top': 'left top',
right: 'right',
'right-bottom': 'right bottom',
'right-top': 'right top',
top: 'top',
},
backgroundSize: {
auto: 'auto',
cover: 'cover',
contain: 'contain',
},
blur: {
0: '0',
sm: '4px',
DEFAULT: '8px',
md: '12px',
lg: '16px',
xl: '24px',
'2xl': '40px',
'3xl': '64px',
},
brightness: {
0: '0',
50: '.5',
75: '.75',
90: '.9',
95: '.95',
100: '1',
105: '1.05',
110: '1.1',
125: '1.25',
150: '1.5',
200: '2',
},
borderColor: (theme) => ({
...theme('colors'),
DEFAULT: theme('colors.gray.200', 'currentColor'),
}),
borderOpacity: (theme) => theme('opacity'),
borderRadius: {
none: '0px',
sm: '0.125rem',
DEFAULT: '0.25rem',
md: '0.375rem',
lg: '0.5rem',
xl: '0.75rem',
'2xl': '1rem',
'3xl': '1.5rem',
full: '9999px',
},
borderWidth: {
DEFAULT: '1px',
0: '0px',
2: '2px',
4: '4px',
8: '8px',
},
boxShadow: {
sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
DEFAULT: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',
md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
'2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)',
inner: 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)',
none: 'none',
},
contrast: {
0: '0',
50: '.5',
75: '.75',
100: '1',
125: '1.25',
150: '1.5',
200: '2',
},
container: {},
cursor: {
auto: 'auto',
default: 'default',
pointer: 'pointer',
wait: 'wait',
text: 'text',
move: 'move',
help: 'help',
'not-allowed': 'not-allowed',
},
divideColor: (theme) => theme('borderColor'),
divideOpacity: (theme) => theme('borderOpacity'),
divideWidth: (theme) => theme('borderWidth'),
dropShadow: {
sm: '0 1px 1px rgba(0,0,0,0.05)',
DEFAULT: ['0 1px 2px rgba(0, 0, 0, 0.1)', '0 1px 1px rgba(0, 0, 0, 0.06)'],
md: ['0 4px 3px rgba(0, 0, 0, 0.07)', '0 2px 2px rgba(0, 0, 0, 0.06)'],
lg: ['0 10px 8px rgba(0, 0, 0, 0.04)', '0 4px 3px rgba(0, 0, 0, 0.1)'],
xl: ['0 20px 13px rgba(0, 0, 0, 0.03)', '0 8px 5px rgba(0, 0, 0, 0.08)'],
'2xl': '0 25px 25px rgba(0, 0, 0, 0.15)',
none: '0 0 #0000',
},
fill: { current: 'currentColor' },
grayscale: {
0: '0',
DEFAULT: '100%',
},
hueRotate: {
'-180': '-180deg',
'-90': '-90deg',
'-60': '-60deg',
'-30': '-30deg',
'-15': '-15deg',
0: '0deg',
15: '15deg',
30: '30deg',
60: '60deg',
90: '90deg',
180: '180deg',
},
invert: {
0: '0',
DEFAULT: '100%',
},
flex: {
1: '1 1 0%',
auto: '1 1 auto',
initial: '0 1 auto',
none: 'none',
},
flexGrow: {
0: '0',
DEFAULT: '1',
},
flexShrink: {
0: '0',
DEFAULT: '1',
},
fontFamily: {
sans: [
'ui-sans-serif',
'system-ui',
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
'Roboto',
'"Helvetica Neue"',
'Arial',
'"Noto Sans"',
'sans-serif',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
'"Noto Color Emoji"',
],
serif: ['ui-serif', 'Georgia', 'Cambria', '"Times New Roman"', 'Times', 'serif'],
mono: [
'ui-monospace',
'SFMono-Regular',
'Menlo',
'Monaco',
'Consolas',
'"Liberation Mono"',
'"Courier New"',
'monospace',
],
},
fontSize: {
13: ['13px', { lineHeight: '20px' }],
xs: ['0.75rem', { lineHeight: '1rem' }],
sm: ['0.875rem', { lineHeight: '1.25rem' }],
base: ['1rem', { lineHeight: '1.5rem' }],
lg: ['1.125rem', { lineHeight: '1.75rem' }],
xl: ['1.25rem', { lineHeight: '1.75rem' }],
'2xl': ['1.5rem', { lineHeight: '2rem' }],
'3xl': ['1.875rem', { lineHeight: '2.25rem' }],
'4xl': ['2.25rem', { lineHeight: '2.5rem' }],
'5xl': ['3rem', { lineHeight: '1' }],
'6xl': ['3.75rem', { lineHeight: '1' }],
'7xl': ['4.5rem', { lineHeight: '1' }],
'8xl': ['6rem', { lineHeight: '1' }],
'9xl': ['8rem', { lineHeight: '1' }],
},
fontWeight: {
thin: '100',
extralight: '200',
light: '300',
normal: '400',
medium: '500',
semibold: '600',
bold: '700',
extrabold: '800',
black: '900',
},
gap: (theme) => theme('spacing'),
gradientColorStops: (theme) => theme('colors'),
gridAutoColumns: {
auto: 'auto',
min: 'min-content',
max: 'max-content',
fr: 'minmax(0, 1fr)',
},
gridAutoRows: {
auto: 'auto',
min: 'min-content',
max: 'max-content',
fr: 'minmax(0, 1fr)',
},
gridColumn: {
auto: 'auto',
'span-1': 'span 1 / span 1',
'span-2': 'span 2 / span 2',
'span-3': 'span 3 / span 3',
'span-4': 'span 4 / span 4',
'span-5': 'span 5 / span 5',
'span-6': 'span 6 / span 6',
'span-7': 'span 7 / span 7',
'span-8': 'span 8 / span 8',
'span-9': 'span 9 / span 9',
'span-10': 'span 10 / span 10',
'span-11': 'span 11 / span 11',
'span-12': 'span 12 / span 12',
'span-full': '1 / -1',
},
gridColumnEnd: {
auto: 'auto',
1: '1',
2: '2',
3: '3',
4: '4',
5: '5',
6: '6',
7: '7',
8: '8',
9: '9',
10: '10',
11: '11',
12: '12',
13: '13',
},
gridColumnStart: {
auto: 'auto',
1: '1',
2: '2',
3: '3',
4: '4',
5: '5',
6: '6',
7: '7',
8: '8',
9: '9',
10: '10',
11: '11',
12: '12',
13: '13',
},
gridRow: {
auto: 'auto',
'span-1': 'span 1 / span 1',
'span-2': 'span 2 / span 2',
'span-3': 'span 3 / span 3',
'span-4': 'span 4 / span 4',
'span-5': 'span 5 / span 5',
'span-6': 'span 6 / span 6',
'span-full': '1 / -1',
},
gridRowStart: {
auto: 'auto',
1: '1',
2: '2',
3: '3',
4: '4',
5: '5',
6: '6',
7: '7',
},
gridRowEnd: {
auto: 'auto',
1: '1',
2: '2',
3: '3',
4: '4',
5: '5',
6: '6',
7: '7',
},
gridTemplateColumns: {
none: 'none',
1: 'repeat(1, minmax(0, 1fr))',
2: 'repeat(2, minmax(0, 1fr))',
3: 'repeat(3, minmax(0, 1fr))',
4: 'repeat(4, minmax(0, 1fr))',
5: 'repeat(5, minmax(0, 1fr))',
6: 'repeat(6, minmax(0, 1fr))',
7: 'repeat(7, minmax(0, 1fr))',
8: 'repeat(8, minmax(0, 1fr))',
9: 'repeat(9, minmax(0, 1fr))',
10: 'repeat(10, minmax(0, 1fr))',
11: 'repeat(11, minmax(0, 1fr))',
12: 'repeat(12, minmax(0, 1fr))',
},
gridTemplateRows: {
none: 'none',
1: 'repeat(1, minmax(0, 1fr))',
2: 'repeat(2, minmax(0, 1fr))',
3: 'repeat(3, minmax(0, 1fr))',
4: 'repeat(4, minmax(0, 1fr))',
5: 'repeat(5, minmax(0, 1fr))',
6: 'repeat(6, minmax(0, 1fr))',
},
height: (theme) => ({
auto: 'auto',
...theme('spacing'),
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
'1/4': '25%',
'2/4': '50%',
'3/4': '75%',
'1/5': '20%',
'2/5': '40%',
'3/5': '60%',
'4/5': '80%',
'1/6': '16.666667%',
'2/6': '33.333333%',
'3/6': '50%',
'4/6': '66.666667%',
'5/6': '83.333333%',
full: '100%',
screen: '100vh',
}),
inset: (theme, { negative }) => ({
auto: 'auto',
...theme('spacing'),
...negative(theme('spacing')),
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
'1/4': '25%',
'2/4': '50%',
'3/4': '75%',
full: '100%',
'-1/2': '-50%',
'-1/3': '-33.333333%',
'-2/3': '-66.666667%',
'-1/4': '-25%',
'-2/4': '-50%',
'-3/4': '-75%',
'-full': '-100%',
}),
keyframes: {
spin: {
to: {
transform: 'rotate(360deg)',
},
},
ping: {
'75%, 100%': {
transform: 'scale(2)',
opacity: '0',
},
},
pulse: {
'50%': {
opacity: '.5',
},
},
bounce: {
'0%, 100%': {
transform: 'translateY(-25%)',
animationTimingFunction: 'cubic-bezier(0.8,0,1,1)',
},
'50%': {
transform: 'none',
animationTimingFunction: 'cubic-bezier(0,0,0.2,1)',
},
},
},
letterSpacing: {
tighter: '-0.05em',
tight: '-0.025em',
normal: '0em',
wide: '0.025em',
wider: '0.05em',
widest: '0.1em',
},
lineHeight: {
none: '1',
tight: '1.25',
snug: '1.375',
normal: '1.5',
relaxed: '1.625',
loose: '2',
3: '.75rem',
4: '1rem',
5: '1.25rem',
6: '1.5rem',
7: '1.75rem',
8: '2rem',
9: '2.25rem',
10: '2.5rem',
},
listStyleType: {
none: 'none',
disc: 'disc',
decimal: 'decimal',
},
margin: (theme, { negative }) => ({
auto: 'auto',
...theme('spacing'),
...negative(theme('spacing')),
}),
maxHeight: (theme) => ({
...theme('spacing'),
full: '100%',
screen: '100vh',
}),
maxWidth: (theme, { breakpoints }) => ({
none: 'none',
0: '0rem',
xs: '20rem',
sm: '24rem',
md: '28rem',
lg: '32rem',
xl: '36rem',
'2xl': '42rem',
'3xl': '48rem',
'4xl': '56rem',
'5xl': '64rem',
'6xl': '72rem',
'7xl': '80rem',
full: '100%',
min: 'min-content',
max: 'max-content',
prose: '65ch',
...breakpoints(theme('screens')),
}),
minHeight: {
0: '0px',
full: '100%',
screen: '100vh',
},
minWidth: {
0: '0px',
full: '100%',
min: 'min-content',
max: 'max-content',
},
objectPosition: {
bottom: 'bottom',
center: 'center',
left: 'left',
'left-bottom': 'left bottom',
'left-top': 'left top',
right: 'right',
'right-bottom': 'right bottom',
'right-top': 'right top',
top: 'top',
},
opacity: {
0: '0',
5: '0.05',
10: '0.1',
20: '0.2',
25: '0.25',
30: '0.3',
40: '0.4',
50: '0.5',
60: '0.6',
70: '0.7',
75: '0.75',
80: '0.8',
90: '0.9',
95: '0.95',
100: '1',
},
order: {
first: '-9999',
last: '9999',
none: '0',
1: '1',
2: '2',
3: '3',
4: '4',
5: '5',
6: '6',
7: '7',
8: '8',
9: '9',
10: '10',
11: '11',
12: '12',
},
outline: {
none: ['2px solid transparent', '2px'],
white: ['2px dotted white', '2px'],
black: ['2px dotted black', '2px'],
},
padding: (theme) => theme('spacing'),
placeholderColor: (theme) => theme('colors'),
placeholderOpacity: (theme) => theme('opacity'),
ringColor: (theme) => ({
DEFAULT: theme('colors.blue.500', '#3b82f6'),
...theme('colors'),
}),
ringOffsetColor: (theme) => theme('colors'),
ringOffsetWidth: {
0: '0px',
1: '1px',
2: '2px',
4: '4px',
8: '8px',
},
ringOpacity: (theme) => ({
DEFAULT: '0.5',
...theme('opacity'),
}),
ringWidth: {
DEFAULT: '3px',
0: '0px',
1: '1px',
2: '2px',
4: '4px',
8: '8px',
},
rotate: {
'-180': '-180deg',
'-90': '-90deg',
'-60': '-60deg',
'-45': '-45deg',
'-12': '-12deg',
'-6': '-6deg',
'-3': '-3deg',
'-2': '-2deg',
'-1': '-1deg',
0: '0deg',
1: '1deg',
2: '2deg',
3: '3deg',
6: '6deg',
12: '12deg',
45: '45deg',
60: '60deg',
90: '90deg',
180: '180deg',
},
saturate: {
0: '0',
50: '.5',
100: '1',
150: '1.5',
200: '2',
},
scale: {
0: '0',
50: '.5',
75: '.75',
90: '.9',
95: '.95',
100: '1',
105: '1.05',
110: '1.1',
125: '1.25',
150: '1.5',
},
sepia: {
0: '0',
DEFAULT: '100%',
},
skew: {
'-12': '-12deg',
'-6': '-6deg',
'-3': '-3deg',
'-2': '-2deg',
'-1': '-1deg',
0: '0deg',
1: '1deg',
2: '2deg',
3: '3deg',
6: '6deg',
12: '12deg',
},
space: (theme, { negative }) => ({
...theme('spacing'),
...negative(theme('spacing')),
}),
stroke: {
current: 'currentColor',
},
strokeWidth: {
0: '0',
1: '1',
2: '2',
},
textColor: (theme) => theme('colors'),
textOpacity: (theme) => theme('opacity'),
transformOrigin: {
center: 'center',
top: 'top',
'top-right': 'top right',
right: 'right',
'bottom-right': 'bottom right',
bottom: 'bottom',
'bottom-left': 'bottom left',
left: 'left',
'top-left': 'top left',
},
transitionDelay: {
75: '75ms',
100: '100ms',
150: '150ms',
200: '200ms',
300: '300ms',
500: '500ms',
700: '700ms',
1000: '1000ms',
},
transitionDuration: {
DEFAULT: '150ms',
75: '75ms',
100: '100ms',
150: '150ms',
200: '200ms',
300: '300ms',
500: '500ms',
700: '700ms',
1000: '1000ms',
},
transitionProperty: {
none: 'none',
all: 'all',
DEFAULT:
'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
colors: 'background-color, border-color, color, fill, stroke',
opacity: 'opacity',
shadow: 'box-shadow',
transform: 'transform',
},
transitionTimingFunction: {
DEFAULT: 'cubic-bezier(0.4, 0, 0.2, 1)',
linear: 'linear',
in: 'cubic-bezier(0.4, 0, 1, 1)',
out: 'cubic-bezier(0, 0, 0.2, 1)',
'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)',
},
translate: (theme, { negative }) => ({
...theme('spacing'),
...negative(theme('spacing')),
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
'1/4': '25%',
'2/4': '50%',
'3/4': '75%',
full: '100%',
'-1/2': '-50%',
'-1/3': '-33.333333%',
'-2/3': '-66.666667%',
'-1/4': '-25%',
'-2/4': '-50%',
'-3/4': '-75%',
'-full': '-100%',
}),
width: (theme) => ({
auto: 'auto',
...theme('spacing'),
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
'1/4': '25%',
'2/4': '50%',
'3/4': '75%',
'1/5': '20%',
'2/5': '40%',
'3/5': '60%',
'4/5': '80%',
'1/6': '16.666667%',
'2/6': '33.333333%',
'3/6': '50%',
'4/6': '66.666667%',
'5/6': '83.333333%',
'1/12': '8.333333%',
'2/12': '16.666667%',
'3/12': '25%',
'4/12': '33.333333%',
'5/12': '41.666667%',
'6/12': '50%',
'7/12': '58.333333%',
'8/12': '66.666667%',
'9/12': '75%',
'10/12': '83.333333%',
'11/12': '91.666667%',
full: '100%',
screen: '100vw',
min: 'min-content',
max: 'max-content',
}),
zIndex: {
auto: 'auto',
0: '0',
10: '10',
20: '20',
30: '30',
40: '40',
50: '50',
},
},
variantOrder: [
'first',
'last',
'odd',
'even',
'visited',
'checked',
'group-hover',
'group-focus',
'focus-within',
'hover',
'focus',
'focus-visible',
'active',
'disabled',
],
variants: {
accessibility: ['responsive', 'focus-within', 'focus'],
alignContent: ['responsive'],
alignItems: ['responsive'],
alignSelf: ['responsive'],
animation: ['responsive'],
appearance: ['responsive'],
backdropBlur: ['responsive'],
backdropBrightness: ['responsive'],
backdropContrast: ['responsive'],
backdropDropShadow: ['responsive'],
backdropFilter: ['responsive'],
backdropGrayscale: ['responsive'],
backdropHueRotate: ['responsive'],
backdropInvert: ['responsive'],
backdropSaturate: ['responsive'],
backdropSepia: ['responsive'],
backgroundAttachment: ['responsive'],
backgroundBlendMode: ['responsive'],
backgroundClip: ['responsive'],
backgroundColor: ['responsive', 'dark', 'group-hover', 'focus-within', 'hover', 'focus'],
backgroundImage: ['responsive'],
backgroundOpacity: ['responsive', 'dark', 'group-hover', 'focus-within', 'hover', 'focus'],
backgroundPosition: ['responsive'],
backgroundRepeat: ['responsive'],
backgroundSize: ['responsive'],
blur: ['responsive'],
borderCollapse: ['responsive'],
borderColor: ['responsive', 'dark', 'group-hover', 'focus-within', 'hover', 'focus'],
borderOpacity: ['responsive', 'dark', 'group-hover', 'focus-within', 'hover', 'focus'],
borderRadius: ['responsive'],
borderStyle: ['responsive'],
borderWidth: ['responsive'],
boxDecorationBreak: ['responsive'],
boxShadow: ['responsive', 'group-hover', 'focus-within', 'hover', 'focus'],
boxSizing: ['responsive'],
brightness: ['responsive'],
clear: ['responsive'],
container: ['responsive'],
contrast: ['responsive'],
cursor: ['responsive'],
display: ['responsive'],
divideColor: ['responsive', 'dark'],
divideOpacity: ['responsive', 'dark'],
divideStyle: ['responsive'],
divideWidth: ['responsive'],
dropShadow: ['responsive'],
fill: ['responsive'],
filter: ['responsive'],
flex: ['responsive'],
flexDirection: ['responsive'],
flexGrow: ['responsive'],
flexShrink: ['responsive'],
flexWrap: ['responsive'],
float: ['responsive'],
fontFamily: ['responsive'],
fontSize: ['responsive'],
fontSmoothing: ['responsive'],
fontStyle: ['responsive'],
fontVariantNumeric: ['responsive'],
fontWeight: ['responsive'],
gap: ['responsive'],
gradientColorStops: ['responsive', 'dark', 'hover', 'focus'],
grayscale: ['responsive'],
gridAutoColumns: ['responsive'],
gridAutoFlow: ['responsive'],
gridAutoRows: ['responsive'],
gridColumn: ['responsive'],
gridColumnEnd: ['responsive'],
gridColumnStart: ['responsive'],
gridRow: ['responsive'],
gridRowEnd: ['responsive'],
gridRowStart: ['responsive'],
gridTemplateColumns: ['responsive'],
gridTemplateRows: ['responsive'],
height: ['responsive'],
hueRotate: ['responsive'],
inset: ['responsive'],
invert: ['responsive'],
isolation: ['responsive'],
justifyContent: ['responsive'],
justifyItems: ['responsive'],
justifySelf: ['responsive'],
letterSpacing: ['responsive'],
lineHeight: ['responsive'],
listStylePosition: ['responsive'],
listStyleType: ['responsive'],
margin: ['responsive'],
maxHeight: ['responsive'],
maxWidth: ['responsive'],
minHeight: ['responsive'],
minWidth: ['responsive'],
mixBlendMode: ['responsive'],
objectFit: ['responsive'],
objectPosition: ['responsive'],
opacity: ['responsive', 'group-hover', 'focus-within', 'hover', 'focus'],
order: ['responsive'],
outline: ['responsive', 'focus-within', 'focus'],
overflow: ['responsive'],
overscrollBehavior: ['responsive'],
padding: ['responsive'],
placeContent: ['responsive'],
placeItems: ['responsive'],
placeSelf: ['responsive'],
placeholderColor: ['responsive', 'dark', 'focus'],
placeholderOpacity: ['responsive', 'dark', 'focus'],
pointerEvents: ['responsive'],
position: ['responsive'],
resize: ['responsive'],
ringColor: ['responsive', 'dark', 'focus-within', 'focus'],
ringOffsetColor: ['responsive', 'dark', 'focus-within', 'focus'],
ringOffsetWidth: ['responsive', 'focus-within', 'focus'],
ringOpacity: ['responsive', 'dark', 'focus-within', 'focus'],
ringWidth: ['responsive', 'focus-within', 'focus'],
rotate: ['responsive', 'hover', 'focus'],
saturate: ['responsive'],
scale: ['responsive', 'hover', 'focus'],
sepia: ['responsive'],
skew: ['responsive', 'hover', 'focus'],
space: ['responsive'],
stroke: ['responsive'],
strokeWidth: ['responsive'],
tableLayout: ['responsive'],
textAlign: ['responsive'],
textColor: ['responsive', 'dark', 'group-hover', 'focus-within', 'hover', 'focus'],
textDecoration: ['responsive', 'group-hover', 'focus-within', 'hover', 'focus'],
textOpacity: ['responsive', 'dark', 'group-hover', 'focus-within', 'hover', 'focus'],
textOverflow: ['responsive'],
textTransform: ['responsive'],
transform: ['responsive'],
transformOrigin: ['responsive'],
transitionDelay: ['responsive'],
transitionDuration: ['responsive'],
transitionProperty: ['responsive'],
transitionTimingFunction: ['responsive'],
translate: ['responsive', 'hover', 'focus'],
userSelect: ['responsive'],
verticalAlign: ['responsive'],
visibility: ['responsive'],
whitespace: ['responsive'],
width: ['responsive'],
wordBreak: ['responsive'],
zIndex: ['responsive', 'focus-within', 'focus'],
},
plugins: [],
}
postcss.config.js
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
'postcss-px-to-viewport': {
viewportWidth: 375,
}
},
}
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 npm run build
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 presets: [] bit, that's what's causing the error. I will try and dig into why, but removing that should be enough to fix the issue.
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.
Hello, this is the warehouse where I have the error, thank you very much for helping me see this problem
node -v
v12.18.0
npm -v
6.14.4
https://github.com/semyin/build-error-repo
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.
Hello, this is the warehouse where I have the error, thank you very much for helping me see this problem
node -v v12.18.0 npm -v 6.14.4https://github.com/semyin/build-error-repo
I tried node version v14.17.1 and it didn't work either
Ah the issue is the
presets: []bit, that's what's causing the error. I will try and dig into why, but removing that should be enough to fix the issue.
It can work, according to the way you gave, thank you very much
module.exports = {
purge: [
'./src/**/*.html',
'./src/**/*.vue',
'./public/**/*.html'
],
// presets: [], // remove this line
}
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:
// eslint-disable-next-line @typescript-eslint/no-var-requires
const colors = require("tailwindcss/colors");
/* eslint-disable prettier/prettier */
module.exports = {
theme: {
// Used Smart Swatch to create
// Joyride Blue - https://smart-swatch.netlify.app/#0083ca
colors: {
...colors,
transparent: 'transparent',
blue: {
50: "#daf8ff",
100: "#aee5ff",
200: "#7ed2ff",
300: "#4dc0ff",
400: "#23aefe",
500: "#1095e5",
600: "#0083ca",
700: "#005381",
800: "#003250",
900: "#001220",
},
darkBlue: {
50: '#e3f5ff',
100: '#bfe0f1',
200: '#99c9e5',
300: '#73b3da',
400: '#4e9ece',
500: '#3684b5',
600: '#27678d',
700: '#17415a',
800: '#0b2c3f',
900: '#001019',
},
red: {
50: "#ffe3e7",
100: "#ffb5bd",
200: "#fa8591",
300: "#f75566",
400: "#F2142B",
500: "#d90c21",
600: "#aa0519",
700: "#7a0312",
800: "#4b0008",
900: "#1f0002",
},
green: {
50: "#e2fbef",
100: "#c1ecd6",
200: "#9ddfbc",
300: "#79d1a2",
400: "#55c489",
500: "#3baa6f",
600: "#2c8455",
700: "#1d5f3d",
800: "#0d3a23",
900: "#001506",
},
orange:
{
50: '#fff4db',
100: '#ffe2af',
200: '#fccf80',
300: '#fabb50',
400: '#ffd300',
500: '#df8e07',
600: '#ad6f02',
700: '#7d4f00',
800: '#4b2e00',
900: '#1e0f00',
},
yellow:
{
50: '#fffbda',
100: '#fff2ad',
200: '#ffe97d',
300: '#ffe04b',
400: '#ffd71a',
500: '#ffd300',
600: '#b39400',
700: '#806a00',
800: '#4d3f00',
900: '#1c1500',
},
},
extend: {
boxShadow: {
DEFAULT: "0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.02)",
md: "0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.02)",
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.01)",
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.01)",
},
fontFamily: {
inter: ["Inter", "sans-serif"],
},
fontSize: {
xxs: ["0.6rem", { lineHeight: "1.2" }],
xs: ["0.75rem", { lineHeight: "1.5" }],
sm: ["0.875rem", { lineHeight: "1.5715" }],
base: ["1rem", { lineHeight: "1.5", letterSpacing: "-0.01em" }],
lg: ["1.125rem", { lineHeight: "1.5", letterSpacing: "-0.01em" }],
xl: ["1.25rem", { lineHeight: "1.5", letterSpacing: "-0.01em" }],
"2xl": ["1.5rem", { lineHeight: "1.33", letterSpacing: "-0.01em" }],
"3xl": ["1.88rem", { lineHeight: "1.33", letterSpacing: "-0.01em" }],
"4xl": ["2.25rem", { lineHeight: "1.25", letterSpacing: "-0.02em" }],
"5xl": ["3rem", { lineHeight: "1.25", letterSpacing: "-0.02em" }],
"6xl": ["3.75rem", { lineHeight: "1.2", letterSpacing: "-0.02em" }],
},
borderWidth: {
3: "3px",
},
screens: {
xs: "480px",
sm: "640px",
md: "768px",
lg: "1024px",
xl: "1280px",
},
zIndex: {
"-10": "-10",
// from mosaic
60: "60",
},
colors: {
"joyride-blue": "#0083ca",
"joyride-blue-alt": "#00a8cc",
"joyride-blue-dark": "#17415a",
"joyride-red": "#F2142B",
"joyride-green": "#38A169",
"joyride-orange": "#f8a519",
"joyride-yellow": "#ffd300",
"joyride-pink": "#ee5b88",
danger: "#dc3545",
warning: "#ffc107",
success: "#28a745",
"chart-blue-1": "#439ad3",
"chart-blue-2": "#4b7b95",
"chart-blue-3": "#29536b",
"chart-blue-4": "#83d1f0",
"chart-blue-5": "#6eafcb",
"chart-blue-6": "#0083ca",
"chart-grey": "#8c8c8c",
"chart-grey-2": "rgba(0, 131, 202, 0.36)",
"chart-orange": "rgba(239, 137, 21, 0.51)",
"chart-orange-2": "rgba(186, 100, 1, 0.40)",
},
width: {
75: "18.75rem",
160: "40rem",
"80v": "80vw",
xxl: "1440px",
xxxl: "1800px",
},
height: {
75: "18.75rem",
120: "30rem",
140: "35rem",
160: "40rem",
"80v": "80vh",
},
maxWidth: {
4: "4rem",
6: "6rem",
8: "8rem",
10: "10rem",
12: "12rem",
14: "14rem",
16: "16rem",
xxl: "1440px",
xxxl: "1800px",
"80v": "80vw",
// from mosaic
"8xl": "88rem",
"9xl": "96rem",
},
maxHeight: {
4: "4rem",
6: "6rem",
8: "8rem",
10: "10rem",
12: "12rem",
14: "14rem",
16: "16rem",
"80v": "80vh",
},
minWidth: {
1: "1rem",
2: "2rem",
3: "3rem",
4: "4rem",
8: "8rem",
10: "10rem",
12: "12rem",
14: "14rem",
16: "16rem",
24: "24rem",
// from mosaic
36: "9rem",
44: "11rem",
56: "14rem",
60: "15rem",
80: "20rem",
},
minHeight: {
0: "0",
1: "0.25rem",
2: "0.5rem",
3: "0.75rem",
4: "1rem",
5: "1.25rem",
6: "1.5rem",
8: "2rem",
10: "2.5rem",
12: "3rem",
16: "4rem",
20: "5rem",
24: "6rem",
32: "8rem",
40: "10rem",
48: "12rem",
56: "14rem",
64: "16rem",
96: "24rem",
128: "32rem",
full: "100%",
},
spacing: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%",
"1/12": "8.333333%",
"2/12": "16.666667%",
"3/12": "25%",
"4/12": "33.333333%",
"5/12": "41.666667%",
"6/12": "50%",
"7/12": "58.333333%",
"8/12": "66.666667%",
"9/12": "75%",
"10/12": "83.333333%",
"11/12": "91.666667%",
full: "100%",
},
},
},
variants: {
display: ["responsive", "group-hover"],
wordBreak: ["responsive", "group-hover"],
textOverflow: ["responsive", "group-hover"],
animation: ["responsive", "motion-safe", "motion-reduce"],
backgroundColor: ["group-hover", "hover"],
outline: ["focus"],
},
plugins: [],
};
⠦ Building for production...warn - As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`.
Until v3.0, I'm getting rid of this warn by doing this fix inside tailwind.config.js
let colors = require('tailwindcss/colors')
delete colors['lightBlue'] // <-----
colors = { ...colors, ...{ transparent: 'transparent' } }
module.exports = {
theme: {
colors
}
}
anybody could update docs, it's confusing

these warnings also appears on v3
tailwind.config.js
module.exports = {
theme: {
colors: ({ colors }) => ({
...colors,
}
}
}
$ postcss ./src/assets/styles/tailwind.css -o ./src/assets/styles/style.css
warn - As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`.
warn - Update your configuration file to silence this warning.
warn - As of Tailwind CSS v3.0, `warmGray` has been renamed to `stone`.
warn - Update your configuration file to silence this warning.
warn - As of Tailwind CSS v3.0, `trueGray` has been renamed to `neutral`.
warn - Update your configuration file to silence this warning.
warn - As of Tailwind CSS v3.0, `coolGray` has been renamed to `gray`.
warn - Update your configuration file to silence this warning.
warn - As of Tailwind CSS v3.0, `blueGray` has been renamed to `slate`.
warn - Update your configuration file to silence this warning.
Why was this issue closed? These warnings are definitely still around in v3 when requiring 'tailwindcss/colors'.
const colors = require('tailwindcss/colors')
module.exports = {
theme: {
colors: colors,
}
}
warn - As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`.
warn - Update your configuration file to silence this warning.
warn - As of Tailwind CSS v3.0, `warmGray` has been renamed to `stone`.
warn - Update your configuration file to silence this warning.
warn - As of Tailwind CSS v3.0, `trueGray` has been renamed to `neutral`.
warn - Update your configuration file to silence this warning.
warn - As of Tailwind CSS v3.0, `coolGray` has been renamed to `gray`.
warn - Update your configuration file to silence this warning.
warn - As of Tailwind CSS v3.0, `blueGray` has been renamed to `slate`.
warn - Update your configuration file to silence this warning.
I can't build when having plugins enabled in config.js
...
plugins: [require("@tailwindcss/ui"), require("@tailwindcss/forms")],
...
const colors = require('tailwindcss/colors') module.exports = { theme: { colors: colors, } }warn - As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`. warn - Update your configuration file to silence this warning. warn - As of Tailwind CSS v3.0, `warmGray` has been renamed to `stone`. warn - Update your configuration file to silence this warning. warn - As of Tailwind CSS v3.0, `trueGray` has been renamed to `neutral`. warn - Update your configuration file to silence this warning. warn - As of Tailwind CSS v3.0, `coolGray` has been renamed to `gray`. warn - Update your configuration file to silence this warning. warn - As of Tailwind CSS v3.0, `blueGray` has been renamed to `slate`. warn - Update your configuration file to silence this warning.
For anyone who is spreading tailwind's full default colors into theme.colors, getting the warning is expected.
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 theme.colors and want to suppress the warning, just delete the deprecated colors after importing.
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'
}
}```
delete colors['lightBlue']; delete colors['warmGray']; delete colors['trueGray']; delete colors['coolGray']; delete colors['blueGray'];
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 https://github.com/tailwindlabs/tailwindcss/discussions/11127#discussioncomment-5762049, @wongjn posted a solution. Instead of including the original colors and spreading them, one can extend the colors instead.