React Style properties autocomplete not working after 2019.3 upgrade

Hi,

After upgrading to 2019.3 I have noticed that the autocomplete for "style" property is not working.

See what I mean in the image below:

1
15 comments

please provide a complete code snippet (as text)

0

Something like that:

 

import React from 'react';

class MyComponent extends React.Component {
constructor(props) {
super(props);
}

render() {
return (
<div style={{padding: 10}}>
Hello World
</div>
);
}
}

export default MyComponent;
0

works for me:

 

do you have node_modules\csstype included in index?

0

I have started a new clean project, just npm installed "react" and "prop-types", you can see the entire node_modules

 

0

I am having the same issue after upgrade but with java classes. Was working on some code...upgraded...went back to coding...no suggestions on any code completes, no auto import etc.

 

Using Intellij Ultimate 2019.3, Ubuntu Linux 18.10, java 11

0

@Kkarski  your issue is clearly different; if invalidating caches doesn't help, please create a support ticket

0

@ValYouW you need https://github.com/frenic/csstype package for CSS completion/type checking in JavaScript, it won't work without this module

0

As I said it broke after the latest upgrade, I've never had this module installed in my projects. But just for the sake of testing I npm installed this module and no luck, still not working...

0

>As I said it broke after the latest upgrade, I've never had this module installed in my projects. 

But completion doesn't work in previous versions when using project like yours. Screenshot from 2019.2.4:

 

>But just for the sake of testing I npm installed this module and no luck, still not working...

 

please try also adding @types/react (`npm i @types/react`)

 

0

Just to make sure, I uninstalled WebStorm, deleted all "settings" folders and re-installed webstorm with fresh new settings (didn't import old settings).

Installed both csstype and react types, no help.

Here is a screencast of what I did:

https://www.dropbox.com/s/is3c1onwujpcpdj/zoom_0.mp4?raw=1 

0

Found it - you need installing Styled Components and Styled JSX plugin to make this work:

 

1

Nope, no luck...

Nevermind, spent too much time on this, I give up for now.

I think this should be supported natively without any plugin/modules etc.

0

Actually this does seem like a bug.

It works just fine after deleting .idea I notice my syntax color is messed up. If I reload Webstorm, then syntax color is fixed but the autocomplete no longer works.

Working

Restart Webstorm - not working:

0

Solved! In my case it never worked.

I even tried to:

npm install csstype

but nothing changed.

It turned out to be caused by an outdated @types/react version which was globally available to all projects;

What I did was simply download the latest version from Settings->Languages & Frameworks -> Javascript -> Libraries -> Download -> react

now it works as expected:

0

Please sign in to leave a comment.