willofindie / vscode-cssvar

VSCode extension to support CSS Variables Intellisense
https://marketplace.visualstudio.com/items?itemName=phoenisx.cssvar
MIT License
243 stars 4 forks source link

[Bug] `$h.provideHover`: ERR Cannot read properties of undefined (reading 'property') #87

Closed ollema closed 1 year ago

ollema commented 1 year ago

Describe the bug I'm getting this strange error when trying to hover over a variable.

Autocomplete is also not working. Only have the Svelte extension, the PostCSS extension and this extension enabled.

The error leads me to believe that it is indeed this extension that is failing:

ERR Cannot read properties of undefined (reading 'property'): TypeError: Cannot read properties of undefined (reading 'property')
    at $h.provideHover (/Users/s0001325/.vscode/extensions/phoenisx.cssvar-2.4.1/out/extension.js:68:519)

I would be very happy to provide more info/context but I don't know where to start. I have attached a small screen recording of what is happening.

To Reproduce Steps to reproduce the behavior:

  1. Enable extension
  2. Hover on css variable

Expected behavior Autocomplete and hover should work

Screenshots

https://user-images.githubusercontent.com/31876997/197547077-6e4d1625-30d7-4a32-b983-2c1a75b14943.mov

Details (please complete the following information):

phoenisx commented 1 year ago

Thanks, @ollema for raising this issue. Your attached video file is in .mov format unsupported on Firefox 😅

Anyways I tried replicating this issue in examples/css-in-node-modules example, but couldn't.

I think this issue happens only in .svelte files with .postcss styles in it.

Can u help me with the following:

Anyways it would be great if you can share a repro of this issue. Or else give me some time to setup and recreate this bug to figure out the issue 👍🏽

ollema commented 1 year ago

for some reason, this started working today. I have closed and reopened vscode a dozen time but today it started working. I will close this for now and re-open with a repro if it happens again

phoenisx commented 1 year ago

There was a recent release v2.4.0 which had a bug, that I fixed in v2.4.1. There's a high possibility that the error you got relates to a previous bug.

I will open a new issue, pointing to this one, to handle such errors more gracefully 👍🏽

Thanks for your support!