-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IntelliSense fails with "Error: Can't resolve '@tailwindcss/typography'" when using Yarn to install dependencies. #1088
Comments
I'm facing the same issue in a |
I think that pnpm also uses symlinks for dependencies and some of these dependencies cannot be accessed by their symlinks, you can check the pnpm docs, they call this feature hoisting. |
In my case, I'm using the shamefully hoist option so that should match the behavior of npm of yarn |
You also have to set the node_linker as well. node_linker: hoisted |
Seems to work thanks! |
Welcome! Happy coding. |
I'm running into the same error using npm workspaces. I have |
As it normally goes, the moment I commented here the extension started to work. If only it did that 2 hours ago. |
What version of VS Code are you using?
v1.95.2
What version of Tailwind CSS IntelliSense are you using?
v0.12.13
What version of Tailwind CSS are you using?
v3.4.14
What package manager are you using?
yarn
What operating system are you using?
Windows 10
Tailwind config
VS Code settings
Reproduction URL
None
Describe your issue
The problem happened when i have installed some of tailwindcss plugins like @tailwindcss/typography using yarn v4.5.1 or newer, it resulted in Tailwind CSS IntelliSense stopped working, when i jumped to Tailwind CSS IntelliSense's Output panel, it was complaining with Error: Can't resolve '@tailwindcss/typography' and IntelliSense not providing suggestions and autocomplete features.
Cause:
When using yarn for installing dependencies, its newer feature pnp is not generating node_models directory by default, causing
plugins: [require("@tailwindcss/typography")
not working because bradlc.vscode-tailwindcss can't find the plugin.Solution:
Switch to use node_modules instead of PnP and SDKs
And that is it.
The text was updated successfully, but these errors were encountered: