In my tailwindcss.config.js file, doing const defaultTheme = require("tailwindcss/defaultTheme"); points to C:/Users/USERNAME/AppData/Local/Microsoft/TypeScript/4.3/node_modules/@types/tailwindcss/defaultTheme.
This was not really a problem for the defaultTheme but it was when importing colors, because it doesn't exist in my AppData.
I thought it was because I didn't have the tailwindcss module so I installed it but it was still not working (version: ^2.0.4). As a workaround, I changed the path in my config file:
I think it should be written in the docs that to import colors, theme or whatever, the tailwindcss module must be installed.
However, I still don't understand why require("tailwindcss") doesn't use the tailwindcss of my node_modules folder.
@nuxtjs/tailwindcss: ^4.0.1 nuxt: ^2.15.3
In my
tailwindcss.config.js
file, doingconst defaultTheme = require("tailwindcss/defaultTheme");
points toC:/Users/USERNAME/AppData/Local/Microsoft/TypeScript/4.3/node_modules/@types/tailwindcss/defaultTheme
. This was not really a problem for the defaultTheme but it was when importing colors, because it doesn't exist in my AppData. I thought it was because I didn't have thetailwindcss
module so I installed it but it was still not working (version: ^2.0.4). As a workaround, I changed the path in my config file:I think it should be written in the docs that to import colors, theme or whatever, the tailwindcss module must be installed. However, I still don't understand why
require("tailwindcss")
doesn't use the tailwindcss of mynode_modules
folder.package.json
nuxt.config.js