reactGo: Error: Cannot find module 'autoprefixer'
After cloning the repository and runing npm install
and then npm run dev
I get the following:
ERROR in ./~/css-loader?module&localIdentName=[name]__[local]___[hash:base64:5]!./~/postcss-loader!./app/css/main.css
Module build failed: Error: Cannot find module 'autoprefixer'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.postCSSConfig (/Users/jon/Sites/react-webpack-node/webpack/webpack.config.dev-client.js:44:5)
at Object.module.exports (/Users/jon/Sites/react-webpack-node/node_modules/postcss-loader/index.js:28:27)
@ ./app/css/main.css 4:14-179 13:2-17:4 14:20-185
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (6 by maintainers)
@jonjamz The issue is that we removed the dependency
npm install autoprefixer
.That should fix it. I’ll push a hotfix when I get the chance. Thanks for raising this issue.
+1 Running
npm install autoprefixer
solved the same issue for me too.Just wanted to say that I’m here from a completely unrelated thing (setting up jekyll and tailwind from this tutorial) and i had the same problem, ran
npm install autoprefixer' and then 'npx tailwindcss init
just worked : )@jonjamz If you’re in a rush to get this working, try working from this commit.
I believe updating the packages / css-loader + postcss-loader might cause some weird behavior.
@jonjamz @puranik3 whenever you get error “Cannot find module ‘xyz’” it means the module is not in “node_modules” directory. so you should run `npm install xyz’ this will add the module in your package.json file and also in 'node_modules" directory.