Search code examples
reactjselectronwebstorm

Make WebStorm see the paths


I do have an Electron + React project which I inherited from another developer. in the index.js there are a couple of imports that WebStorm is saying it cannot find, however, the application compiles and works as needed.

enter image description here

and here is the structure of the folders relative to index.js

enter image description here

How do I make WebStorm happy and make it see the imports and navigate properly to them? I tried to use exports section in the package.json like this

"exports": {
    "./": "./src/"
  }

but it didn't help. Any other options?


Solution

  • Right-click on src directory and select Mark Directory as | Resource Root.