reactjsnext.jswebstorm

WebStorm unable to recognise Next.js project


I'm having an issue with an existing project in React Next.js, previously it was working fine but now it's unable to recognise the project and files. Hence I cannot search for files, and also cannot find in files.

I have tried File > Invalidate Caches but it's still not able to recognise.

Does anyone know what causes this issue, and how to fix it?

Screenshots attached.

WebStorm Project not recognised:

WebStorm Project not recognised

WebStorm Project files not recognised:

WebStorm Project files not recognised

WebStorm cannot search files:

WebStorm cannot search files

WebStorm cannot find in files:

WebStorm cannot find in files


Solution

  • Summary based on @s0xzwasd and @LazyOne suggestion:

    Issue:

    Project config is somehow corrupted. Files are treated as "outside of the project".

    Fix/Solution steps:

    1. Close the project from WebStorm.
    2. Backup and delete .idea directory in the project root.
    3. Re-open project.
    4. IDE will create a new project from existing files / treating the files as included in the project.