Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find module 'tailwindcss'

I am trying out tailwindcss with my Vue project and while I solved some issue I had with the routing (while trying to break down my code into smaller components), I think I broke something else.

The code was compiling before I added my new routes. I can't seem to find what is wrong in this case.

Failed to compile.

./src/components/SiteHeader.vue?vue&type=style&index=0&lang=css& (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SiteHeader.vue?vue&type=style&index=0&lang=css&)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Cannot find module 'tailwindcss'

you can check out this repo, has very few files https://github.com/anaivanm/vue-tw/

like image 438
Ana Ivan Avatar asked Nov 09 '19 20:11

Ana Ivan


1 Answers

First :

npm run dev

Then

npm install -D tailwindcss@latest postcss@latest autoprefixer@latest

For More Info : Tailwind Docs

Also check this out :Restarting NPM

like image 152
Hesam Moosapour Avatar answered Sep 29 '22 16:09

Hesam Moosapour