-1

Failed to compile ./src/index.css (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-4-1!./node_modules/postcss-loader/src??postcss!./src/index.css) Error: Cannot find module 'autoprefixer'

mplungjan
  • 169,008
  • 28
  • 173
  • 236
  • Please [search your error](https://www.google.com/search?q=cannot+find+module+%27autoprefixer%27+site:stackoverflow.com) before asking – mplungjan Dec 24 '20 at 07:34
  • try running `npm install` first? – Nishant Dec 24 '20 at 07:34
  • does this help you: https://stackoverflow.com/questions/65179304/tailwind-in-react-project-getting-cannot-find-module-autoprefixer-error-du/65179433#65179433 – Sinan Yaman Dec 24 '20 at 07:47
  • does this help you: https://stackoverflow.com/questions/65179304/tailwind-in-react-project-getting-cannot-find-module-autoprefixer-error-du/65179433#65179433 – Sinan Yaman Dec 24 '20 at 07:48

2 Answers2

0
cd node_modeuls/postcss-loader // you need check the correct library name from the error
npm i autoprefixe
cd ../../
npm start
Wang Liang
  • 4,244
  • 6
  • 22
  • 45
  • i tried to install autoprefix but i got another new error – Nkusikevin Dec 24 '20 at 08:59
  • ./src/index.css (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-4-1!./node_modules/postcss-loader/src??postcss!./src/index.css) Error: Cannot find module 'cssdb' – Nkusikevin Dec 24 '20 at 08:59
0

Try to use this method:

  • Delete the node_modules folder

  • use the yarn command. Or if you don't have Yarn installed, try to install it first with npm install yarn and run the command yarn to install the package you need.

Kenn
  • 587
  • 1
  • 5
  • 7