WebStorm reindexing after every page load in Next.JS project

I have a Next.JS react project that has the following structure


| package.json
| src
| - pages/
| - components
| - etc...
| next.config.js
| node_modules
| server.js

And the run configuration I use to run my dev server, as according to the package.json, is

NODE_ENV=development PORT=3000 node server.js

But whenever I load a page, and sometimes seemingly randomly, WebStorm starts reindexing again.  It doesn't index the entire thing, but it takes 5-10 seconds usually to reindex, and during this a lot of features don't work.  

Why is it doing this?  I have already tried invalidating caches/restarting.  That didn't fix anything.

1 comment
Comment actions Permalink

Please make sure that the build target folder is excluded from indexing (Mark directory as/Excluded) to avoid re-indexing after flashing the generated files to disk


Please sign in to leave a comment.