Loading PostCSS "tailwindcss" plugin failed: Cannot find module 'tailwindcss'
ptgamr opened this issue · 5 comments
ptgamr commented
Bug report
Upgrading to latest version of postcss - https://github.com/postcss/postcss/releases/tag/8.4.16
Build failed with standard configuration of webpack + postcss-loader + tailwindcss
Loading PostCSS "tailwindcss" plugin failed: Cannot find module 'tailwindcss'
Downgrade to 8.4.14 the build is fine again
Actual Behavior
Build failed
Expected Behavior
Build should not failed
How Do We Reproduce?
// webpack config
{
test: /\.tailwind\.css$/i,
use: [
'style-loader',
{loader: 'css-loader', options: {importLoaders: 1}},
'postcss-loader',
],
},
// postcss.config.js
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
// tailwind.config.js
module.exports = {
mode: 'jit',
future: {
removeDeprecatedGapUtilities: true,
purgeLayersByDefault: true,
},
content: ['./src/**/*.tsx'],
theme: {},
variants: {},
plugins: [],
corePlugins: {
preflight: false,
},
}
alexander-akait commented
It means you don't have installed tailwindcss
ptgamr commented
I'm sure tailwindcss
is installed - that's why "Downgrade to 8.4.14 the build is fine again"
alexander-akait commented
Sounds like a bug in PostCSS, we don't have 8.4.14
version, we just PostCSS runner, not more, can you create reproducible test repo?
teezyben1 commented
am having the same problem here
alexander-akait commented
Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Thanks!