Skip to content
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

Version ^3 not working on Mac #130

Closed
JamesCollardDigitonomy opened this issue Jun 18, 2020 · 30 comments
Closed

Version ^3 not working on Mac #130

JamesCollardDigitonomy opened this issue Jun 18, 2020 · 30 comments

Comments

@JamesCollardDigitonomy
Copy link

Hi,

I updated all of my extensions yesterday and noticed that this extension has been broken since.

If I downgrade to a ^2 version then everything is fine and I'll continue with that for now.

When on version 3, the only output for the extension that I get in vscode is...

Node#before is deprecated. Use Node#raws.before

And I have not autocompletion anywhere (from what I can tell)

My versions are below
Version: 1.46.0
Commit: a5d1cc28bb5da32ec67e86cc50f84c67cc690321
Date: 2020-06-10T08:59:06.977Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.5.0

@bradlc
Copy link
Contributor

bradlc commented Jun 18, 2020

Hey @JamesCollardDigitonomy. Please could you share some more details about your project?

Which package manager are you using (npm, yarn, or something else?) and what does your directory structure look like (in particular where is your tailwind config located)? If you could share a repo that would be even better.

@JamesCollardDigitonomy
Copy link
Author

Hey @bradlc . The repo is private so I can't share but I'm using npm.

Small thing is that I use NVM to switch between node versions. I'm currently using 14.4.0 but as you can see above vscode is saying 12.8.1.

It is a Laravel project using webpack, laravel-mix and tailwind.

So my directory structure is...

image

My tailwind config hasn't been changed that much since the npx init tailwind. Just added some colors.

If there is any other way I can give more info or help debug, let me know.

Thanks

@gavinworks
Copy link

I've also updated everything and found a curious anomaly... When using npx tailwind init to create a tailwind.config.js file, the purge property accepts an array. However it's an object in the tailwind docs so we start with purge: [], at the top of the file and with all other changes everything works fine. But as soon as we want to force a purge (according to the tailwind docs by setting purge to true inside an purge object) like this

purge {
  enabled: true
},
// ... other settings here

the tailwind intellisense plugin stops providing suggestions. What's more... when you revert purge back to an empty array (i.e. what you started with), it takes a VS Code reload/restart for intellisense to start providing suggestions again.

Curious! Hope that helps to debug.

@datrinh
Copy link

datrinh commented Jun 23, 2020

Facing the same issue on Mac. Downgrading to v2 works.

@JamesCollardDigitonomy
Copy link
Author

@gavinworks I had a little look at the purge option in the tailwind config to try and see whether tweaking that would make any difference but I'm still having no luck with getting v3 working at all.

I'm just running v2 now

Thanks

@gavinworks
Copy link

@datrinh @JamesCollardDigitonomy I'll try downgrading for now then. I see that @bradlc has pushed to the repo a few changes to ignore the purge option. Perhaps an update is imminent? #131

PS Congrats @bradlc on your new Tailwind Appointment! Good to see a Yorkshireman taking the world by storm! Hello from Selby! :)

@bradlc
Copy link
Contributor

bradlc commented Jun 23, 2020

Haha thanks @gavinworks! I’m actually from Lancashire originally 😄

Which version of tailwindcss are you using @JamesCollardDigitonomy?

@JamesCollardDigitonomy
Copy link
Author

@bradlc v1.4.6

@bradlc
Copy link
Contributor

bradlc commented Jun 23, 2020

If you get chance @JamesCollardDigitonomy please could you clone this repo, run npm install, open VS Code, and see if you get autocomplete? https://github.com/bradlc/laravel-tailwindcss-test

@JamesCollardDigitonomy
Copy link
Author

Thanks @bradlc, No change on that so I assume it's something to do with my setup generally.

Same thing on that repo. v3 doesn't work. v2 is fine. Doing reloads in between installed just to double check.

@mbulfair
Copy link

Same for me, version 0.3x all my previous intellisense fails in all files, 0.2 works fine. What changed? I have multiple projects some where it's lerna and only 1 of them has tailwind, in a child folder, and others where it's the root.

@mbulfair
Copy link

Version 0.4 now causes:

(node:87811) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'classNames' of undefined
    at Object.t.getClassNameParts (/Users/xxx/.vscode/extensions/bradlc.vscode-tailwindcss-0.4.0/dist/server/index.js:31:35152)
    at Object.t.getClassNameDecls (/Users/xxx/.vscode/extensions/bradlc.vscode-tailwindcss-0.4.0/dist/server/index.js:45:620)
    at /Users/xxx/.vscode/extensions/bradlc.vscode-tailwindcss-0.4.0/dist/server/index.js:13:71022
    at Array.forEach (<anonymous>)
    at /Users/xxx/.vscode/extensions/bradlc.vscode-tailwindcss-0.4.0/dist/server/index.js:13:70998
    at Array.forEach (<anonymous>)
    at Object.t.getCssConflictDiagnostics (/Users/xxx/.vscode/extensions/bradlc.vscode-tailwindcss-0.4.0/dist/server/index.js:13:70946)
    at /Users/xxx/.vscode/extensions/bradlc.vscode-tailwindcss-0.4.0/dist/server/index.js:1:163263
    at Generator.next (<anonymous>)
    at s (/Users/xxx/.vscode/extensions/bradlc.vscode-tailwindcss-0.4.0/dist/server/index.js:1:162562)

@followbl
Copy link

@mbulfair same - just confirming for you the same @bradlc - thanks for the great plugin - one of my favorite I use.

specs:

version: 0.4
vscode: Version: 1.47.0-insider

holler if you want any more specs

@mbulfair
Copy link

Here's my info:
Seems only 0.2x is working, so would I have to change my tailwind.config to support this plugin?

Version: 1.46.1
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Date: 2020-06-17T21:17:14.222Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.5.0

@bradlc
Copy link
Contributor

bradlc commented Jun 23, 2020

Would love to get to the bottom of this! If any of you get chance please could you install this version of the extension and take a look in the Output panel for any errors (you'll have to select tailwindcss-intellisense in the dropdown): https://send.firefox.com/download/7f6f48d843449651/#Vw9xlwqqlGTjcTwg7ZfXEA

There's instructions here that explain how to install a VSIX file: https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix

@followbl
Copy link

Very well could be wrong...but here's what I got when attempting to start up with your vsix above.

[Error - 3:17:58 PM] Server initialization failed.
  Message: Request initialize failed with message: Invariant failed: No Tailwind CSS config found.
  Code: -32603 

@mbulfair
Copy link

mbulfair commented Jun 23, 2020

Same

[Error - 4:40:44 PM] Server initialization failed.
  Message: Request initialize failed with message: Invariant failed: No Tailwind CSS config found.
  Code: -32603 

I wish there was a way to set in vscode the path to where it lived though. For me, I have a lerna project and only 1 of those packages has tailwind. So I have to symlink it to the root for the 0.2 plugin to work.

@bradlc
Copy link
Contributor

bradlc commented Jun 23, 2020

Thanks @followbl @mbulfair that is super helpful! Here's a new version that I think might fix the issue: https://send.firefox.com/download/740ed91851cd0f04/#8xpnGX9wooO1HxO3ElV5iA

@followbl
Copy link

working...get auto-complete but am not getting the new tw lint errors. could be doing something wrong - but whatever you did in this latest build has fixed the functionality for me

@followbl
Copy link

@bradlc I lied to you - it's working and awesome - thanks for the hookup! 🪂

@JamesCollardDigitonomy
Copy link
Author

@bradlc Everything is working on that debug version. I get nothing in the output but everything is perfect. Thanks

bradlc added a commit that referenced this issue Jun 24, 2020
@bradlc
Copy link
Contributor

bradlc commented Jun 24, 2020

Great, thanks @followbl @JamesCollardDigitonomy! There's a new version in the marketplace now (v0.4.1) which has some tweaks to the config finder. Let me know if you have any more issues

@bradlc bradlc closed this as completed Jun 24, 2020
@mbulfair
Copy link

The official 0.4.1 works for me, thank you for the quick work and fix :)

@JamesCollardDigitonomy
Copy link
Author

@bradlc The new marketplace 0.4.1 is working perfectly. Thanks for your help. It's a really helpful extension. Really noticed when it wasn't working 😂

@datrinh
Copy link

datrinh commented Jun 25, 2020

0.4.1 didn't solve my issue.

Mac OS Catalina 10.15

@bradlc
Copy link
Contributor

bradlc commented Jun 25, 2020

@datrinh If you get chance please could you install this version of the extension and take a look in the Output panel for any errors (you'll have to select tailwindcss-intellisense in the dropdown): https://send.firefox.com/download/8d7550dcdb7e6b68/#Afji8n9QPC8Zj3h9PGz_1g

There's instructions here that explain how to install a VSIX file: https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix

@datrinh
Copy link

datrinh commented Jun 25, 2020

@bradlc I followed your instructions, but I get no Output at all.

0.2.0
image

0.4.1 / VSIX
image

@bradlc
Copy link
Contributor

bradlc commented Jun 25, 2020

@datrinh Sorry, that was the wrong package, without the debug stuff 😅 Please could you try this one (0.4.1-debug.1): https://send.firefox.com/download/9e15bc6c9b0c9262/#1CfWFCBWe0MMPOLvqLITmw

@datrinh
Copy link

datrinh commented Jun 25, 2020

@bradlc Oddly enough, it has the same result.

EDIT: Turns out I didn't have the latest VSCode installed. It works now that I moved VSCode into the programs folder.

Sorry for the inconvinience...

@sgwanlee
Copy link

I'd used v1.4 vscode. After I updated vscode v1.5, everything works fine!

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

No branches or pull requests

7 participants