forsartis / vue-cli-plugin-tailwind

vue-cli plugin for Tailwind CSS
MIT License
211 stars 10 forks source link

Generating tailwind.config.js does not work under macOS #26

Closed lovetodream closed 3 years ago

lovetodream commented 3 years ago

As mentioned in the title, generating the tailwind.config.js (full and minimal) does not work under macOS (Big Sur). Made a fresh vue project and tried to install tailwind via vue add tailwind.

If I create a tailwind.config.js file first, it asks me to replace it. If I agree, it deletes the current tailwind.config.js, but afterwards I get the same error.

Bildschirmfoto 2020-11-25 um 22 17 12
Soupertonic commented 3 years ago

Doesn't work on Windows either. image

gertst commented 3 years ago

Same issue here ... on a Mac

lovetodream commented 3 years ago

I've made a pull request. The problem is that, if tailwind is not already a installed dependency, the plugin can't generate the tailwind.config.js. As a workaround you need to install it first npm install tailwindcss before vue add tailwind. If this is intended it should be mentioned in the README.

forsartis commented 3 years ago

tailwindcss should get installed automatically because it is a dependency of this plugin. In a fresh vue project after only running vue add tailwind can you check if the folder ./node_modules/tailwindcss and the file ./node_modules/.bin/tailwind exists? If not are those maybe nested inside ./node_modules/vue-cli-plugin-tailwind/node_modules?

Also, what version of node and vue-cli are you running?

lovetodream commented 3 years ago

tailwindcss should get installed automatically because it is a dependency of this plugin. In a fresh vue project after only running vue add tailwind can you check if the folder ./node_modules/tailwindcss and the file ./node_modules/.bin/tailwind exists? If not are those maybe nested inside ./node_modules/vue-cli-plugin-tailwind/node_modules?

Also, what version of node and vue-cli are you running?

I updated vue-cli (now 4.5.9) earlier today. I can confirm that it works with this version of vue-cli, in my case at least. I think it was a problem with the version of vue-cli I had installed before.

adrikagupta commented 3 years ago

tailwindcss should get installed automatically because it is a dependency of this plugin. In a fresh vue project after only running vue add tailwind can you check if the folder ./node_modules/tailwindcss and the file ./node_modules/.bin/tailwind exists? If not are those maybe nested inside ./node_modules/vue-cli-plugin-tailwind/node_modules? Also, what version of node and vue-cli are you running?

I updated vue-cli (now 4.5.9) earlier today. I can confirm that it works with this version of vue-cli, in my case at least. I think it was a problem with the version of vue-cli I had installed before.

I am having the same issue even though the version that I am using is also @vue/cli 4.5.9