I am currently working with Vue 3 and attempting to integrate tailwindcss by following this helpful tutorial: https://tailwindcss.com/docs/guides/vue-3-vite#install-tailwind-via-npm
I have successfully installed the necessary dependencies using the command below:
npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
However, when I attempted to create the configuration files with this command
npx tailwindcss init -p
An error message was returned:
npx: installed 83 in 5.2s Cannot find module 'autoprefixer' Require stack:
- /~/.npm/_npx/33283/lib/node_modules/tailwindcss/lib/cli/commands/build.js
- /~/.npm/_npx/33283/lib/node_modules/tailwindcss/lib/cli/commands/index.js
- /~/.npm/_npx/33283/lib/node_modules/tailwindcss/lib/cli/main.js
- /~/.npm/_npx/33283/lib/node_modules/tailwindcss/lib/cli.js
I am puzzled as to why autoprefixer
is not being detected even though I have already installed it. It is also listed in the package.json file.
{
"name": "wooclime",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
...