Open TotalLag opened 2 years ago
Weird - it's working just fine for me using the same version of bradlc.vscode-tailwindcss
(0.8.7
), though I'm running Linux. Guess it could must have something to do with Windows on top of everything else. :thinking:
very possible. i'm running this in WSL1 (linux environment on windows) but it's weird that it's only this plugin. my best guess is how it's trying to require the lib's path? (or a combination of how symlinks work in WSL)
const flattenColorPalette = require('tailwindcss/lib/util/flattenColorPalette');
const toColorValue = require('tailwindcss/lib/util/toColorValue');
const { flagEnabled } = require('tailwindcss/lib/featureFlags');
tried poking in other plugins to see how they access the libs, but haven't gotten too far.
I have the same issue, intellisense for tailwind CSS stopped working after installing and enabling this plugin. I'm using Windows 11.
Same issue here. Intellisense for tailwind stopped working after installing on macOS Big Sur.
macOS Ventura here, works fine!
Tailwind CSS IntelliSense 0.9.1 VS Code 1.74
Using prefixed Tailwind above, hence the ld-
.
Got it working by adding public-hoist-pattern[]=*tailwind-scrollbar*
to .npmrc
Has anyone been able to bypass this?
I get this error during compile and tailwind doesn't build at all unless I comment the line out in the config file:
[nuxt:tailwindcss 5:19:46 PM] WARN Failed to load Tailwind config at: ./tailwind.config.js require(...)(...) is not a function
at tailwind.config.js:33:62
at evalModule (node_modules/jiti/dist/jiti.js:1:256443)
at jiti (node_modules/jiti/dist/jiti.js:1:254371)
at node_modules/tailwindcss/lib/lib/load-config.js:48:30
at loadConfig (node_modules/tailwindcss/lib/lib/load-config.js:50:6)
at node_modules/@nuxtjs/tailwindcss/dist/module.mjs:289:29
at Array.map (<anonymous>)
at setup (node_modules/@nuxtjs/tailwindcss/dist/module.mjs:286:19)
at async normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:2112:17)
at async installModule (node_modules/@nuxt/kit/dist/index.mjs:2415:95)
My tailwind.config.js :
import tailwindcssAnimate from 'tailwindcss-animate'
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: ['class'],
content: ['./pages/**/*.{ts,tsx,vue}', './components/**/*.{ts,tsx,vue}', './app/**/*.{ts,tsx,vue}', './src/**/*.{ts,tsx,vue}'],
theme: {
container: {
center: true,
padding: '2rem',
screens: {
'2xl': '1400px',
},
},
extend: {
keyframes: {
'accordion-down': {
from: { height: 0 },
to: { height: 'var(--radix-accordion-content-height)' },
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: 0 },
},
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
},
},
},
plugins: [tailwindcssAnimate,
require('tailwind-scrollbar')({ nocompatible: true })({ preferredStrategy: 'pseudoelements' })
],
}
The suggestion by Winprox does not work.
Hey @redmondking, this looks unrelated. Notice the error:
WARN Failed to load Tailwind config at: ./tailwind.config.js require(...)(...) is not a function
Try changing
require('tailwind-scrollbar')({ nocompatible: true })({ preferredStrategy: 'pseudoelements' })
to
require('tailwind-scrollbar')({
nocompatible: true,
preferredStrategy: 'pseudoelements',
})
It's a single options object - it's not going to support chaining like that.
Hey @redmondking, this looks unrelated. Notice the error:
WARN Failed to load Tailwind config at: ./tailwind.config.js require(...)(...) is not a function
Try changing
require('tailwind-scrollbar')({ nocompatible: true })({ preferredStrategy: 'pseudoelements' })
to
require('tailwind-scrollbar')({ nocompatible: true, preferredStrategy: 'pseudoelements', })
It's a single options object - it's not going to support chaining like that.
Thanks, this fixed it. I don't know how I missed this. All is well again.
yeah.. Same from me.. Not working for me.
I think the issue is a combination of getting hoisted by pnpm and intellisense, but this is the only plugin vscode can't resolve when it's enabled:
Interestingly, it builds just fine and works as intended, but the error prevents other intellisense functions from working. My workaround has been to disable (comment out) the plugin during development and re-enable for builds.
I'm more curious why pnpm interferes for this and have tried the new exclusion patterns to no luck:
Another workaround that works:
(this just manually installs the packages individually away from pnpm)