Skip to content

v0.12.7 broken #1033

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

Closed
spacecat opened this issue Aug 23, 2024 · 26 comments · Fixed by #1043
Closed

v0.12.7 broken #1033

spacecat opened this issue Aug 23, 2024 · 26 comments · Fixed by #1043
Assignees

Comments

@spacecat
Copy link

spacecat commented Aug 23, 2024

Installed it just now and I'm not getting any intellisense suggestions and the console complains about the following:

[GLOBAL] No matching project for document

I closed all VS Code windows and terminated the VS Code by "Quitting" my app in my Mac app bar at the bottom.

I reverted back to v0.12.6 and now the extension works again.

Edit: For those that don't know; right click the extension in VS Code Extensions Marketplace and select "Install Specific Version..." and select v0.12.6 to get it working again.

@jaaymes
Copy link

jaaymes commented Aug 23, 2024

me too, downgrade v0.12.6

@OliverGrimsley
Copy link

same here, not working inside vue templates, tried a few other suggestions in other issues, not fixed, downgrade to 12.6 restores functionality

@gurenGithub
Copy link

me too, downgrade v0.12.6

@josh-dastmalchi
Copy link

fwiw deleting the comments in my angular project's styles.scss file and restarting the extension fixed it. but I just rolled back the extension instead.

@lbtoha
Copy link

lbtoha commented Aug 25, 2024

I also facing this issue. Downgrade v0.12.6 is working fine.

@Koyamie
Copy link

Koyamie commented Aug 25, 2024

Same here, if it helps v0.12.7 started erroring when scanning my SCSS files with the following error:

[Error - 2:12:25 PM] Failed to initialize workspace folder .../website e [CssSyntaxError] : .../website/src/styles/bulma.scss:66:1: Unknown word
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser

@EPaulGR
Copy link

EPaulGR commented Aug 25, 2024

i had the same problem [Info - 12:38:48] [GLOBAL] No matching project for document { fsPath: '/Users/erickpaulgarciaramirez/Proyectos/front-el-cipres/server.ts', normalPath: '/Users/erickpaulgarciaramirez/Proyectos/front-el-cipres/server.ts' }

@lougreenwood
Copy link

👍 - but I get it in the Zed editor from the plain tailwind-language-server

@craxrev
Copy link

craxrev commented Aug 26, 2024

Like the comment above suggested, deleting inline comments (//) in scss files fixes the issue, you can check logs to see which files have errors

@OliverGrimsley
Copy link

@craxrev - problem (at least for me) is that many scss files that have comments are in my vendor folder, so not mine, and will get re-written on an update and fail. Whatever parser they are using is apparently not detecting // or /* comments.

@rodrigo-mahamud
Copy link

OMG, all morning wasted trying to figure this one out 🤬.

@Yunlongzzj
Copy link

me too, downgrade v0.12.6

@EnettyTech
Copy link

Me too, downgrade v0.12.6

@DadvDadv
Copy link

same => downgrade v0.12.6

@Rennola
Copy link

Rennola commented Aug 27, 2024

Wasted a couple of hours on this, downgrade the version

@gugatxr
Copy link

gugatxr commented Aug 27, 2024

Same problem here. downgrade works

@philipp-spiess philipp-spiess self-assigned this Aug 28, 2024
philipp-spiess added a commit that referenced this issue Aug 28, 2024
Fixes: #1033
Fixes: #1034 
Fixes: #1035 
Fixes: #1036 
Fixes: #1037 
Fixes: #1038 
Fixes: #1039 
Fixes: #1040
Fixes: #1041
Fixes: #1042 
Fixes: tailwindlabs/tailwindcss#14274

When we worked on #1030, we added a new `postcss` run inside the project
locator. Unfortunately this can crash (e.g. when non standard CSS
features are discovered like those in a `.sass` or `.scss` file) which
currently breaks the whole project locator step, making the extension
not work anymore as soon as such a file is detected.

The short term fix here is to handle this error. In the very future we
have to replace this postcss step anyways because now that Tailwind v4
supports plugins and JS config files, we need to be able to execute the
config to get the proper sources.

## Before

<img width="659" alt="before"
src="https://github.com/user-attachments/assets/8f86e70d-66c2-40a1-ba97-9f4b9b018c94">

## After

<img width="656" alt="after"
src="https://github.com/user-attachments/assets/bfd17b72-c748-4ea9-b73d-86c444cda16a">
@philipp-spiess
Copy link
Member

Hey all! Thanks for reporting this and sorry for the troubles! We just released v0.12.8 of the VS Code extension with a fix that resolves this issue. If you still have issues, please let us know!

@EmmanuelOga
Copy link

I got the exact same error when using this version: v0.13.38 (pre-release)

I suspect the way to replicate this issue is to put TW config, input.css and some TSX file in mismatching locations. My repo uses a packages folder on the root of the repository.

  • packages/frontend/components/my-component.tsx
  • packages/server/src/input.css
  • packages/server/tailwind.config.js (with content: ["../.../**/*.{ts,tsx}"], or something like that)

... Now open my-component.tsx on VS Code with the TW extension installed, the "No matching project" error appears.

I "fixed it" by moving both tailwind.config.js and input.css to the root folder of the repository.

@vdiaz1130
Copy link

vdiaz1130 commented Feb 24, 2025

This is happening again in a Nrwl Nx Angular monorepo project. Seems the problem started with Tailwind 4 and Intellisense plugin version 0.14.2. Version 0.14.1 works as expected while newer versions beyond that fail with the following message:

Searching for Tailwind CSS projects in the workspace's folders.
{"tailwind":{"version":"4.0.8","features":["css-at-theme","layer:base","content-list"],"isDefaultVersion":false},"path":"/Users/userName/Documents/projects/my-project/tailwind.config.js"}
{"tailwind":{"version":"4.0.8","features":["css-at-theme","layer:base","content-list"],"isDefaultVersion":false},"path":"/Users/userName/Documents/projects/my-project/apps/admin/src/styles.scss"}
[Warn  - 2:12:23 PM] The config /Users/userName/Documents/projects/my-project/apps/admin/src/styles.scss requires a preprocessor and is not supported by Tailwind CSS v4.0.
[Global] Creating projects: []
[Global] Preparing projects...

Note the preprocessor warning "...requires a preprocessor and is not supported by Tailwind CSS v4.0"
[Global] Initializing projects...
[Info  - 2:12:23 PM] [GLOBAL] No matching project for document {
  fsPath: '/Users/userName/Documents/projects/my-project/apps/admin/src/app/app.component.html',
  normalPath: '/Users/userName/Documents/projects/my-project/apps/admin/src/app/app.component.html'
}
[Global] Initialized 0 projects
[Info  - 2:12:23 PM] [GLOBAL] No matching project for document {
  fsPath: '/Users/userName/Documents/projects/my-project/apps/admin/src/app/app.component.html',
  normalPath: '/Users/userName/Documents/projects/my-project/apps/admin/src/app/app.component.html'
}

@tientq64
Copy link

The problem still occurs in tailwindcss v4

@leephan2k1
Copy link

Version v0.12.6 works for me, thanks to those who suggested it earlier. I don't understand what the heck Tailwind is doing with the new versions anymore.

@Goldbeener
Copy link

same => downgrade v0.14.11

@sxlwar
Copy link

sxlwar commented Apr 1, 2025

For me, create a new css file under the project root floder, e.g src/style.css, copy this @import "tailwindcss" into the file, the plugin works.

@YYsuni
Copy link

YYsuni commented Apr 30, 2025

I found that changing the SCSS file to a CSS file resolved the issue.

@MarufZak
Copy link

MarufZak commented May 7, 2025

for me that was because i used postcss.config.mjs instead of postcss.config.js with cjs export

@timmywil
Copy link

Most recent version that works for me is 0.14.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.