PyCharm suggests/autoimports from wrong Reactstrap directory


For example, to make `Col` work, it needs to be imported as `import { Col } from "reactstrap";` But PyCharm keeps suggesting `import Col from "reactstrap/src/Col";`, which results in the React app not compiling:

This also happens when I copy and paste some markup (for example a layout tree with rows, columns, etc.). Then, PyCharm automatically creates the wrong import statements which I then have to clean up afterwards.

How can I make PyCharm understand not to use the `src` folder?

Comment actions Permalink


Looking at the screenshot I can see that the second option is actually import { Col } from "reactstrap". Is there something wrong with it?

Or is it that you simply would like to get rid of the first option in the popup?

Comment actions Permalink

Yes, you're right in that the second option is correct. I'd like to get rid of the first one.

But, actually, more important than cleaning up this drop-down is when I paste large amounts of JSX and imports are added automatically. Because then I have to change all of them. E.g. by pasting something like [this](

Comment actions Permalink

Sweet. Thanks a lot :)

Comment actions Permalink

Sergey Karpov

My problem is worse than original issue.

PHPStorm 2020.2.1 suggests `import Col from "reactstrap"` which should be `import {Col} from "reactstrap"`

After autoimport

Comment actions Permalink isn't fixed yet. Please follow it to be notified on any progress.


Please sign in to leave a comment.