I have a dozen dependencies in my package.json file with those pulling in many other dependencies. We all know the dependency tree can grow very fast.
I run npm run dev a number of times without it giving me an error. However, it recently started to complain about a missing module. There is no delta in the dependency tree at those times, nor did we change any code that might need the missing module.
Clearing the node_modules folder and doing a fresh npm install always fixes the issue, but I don't know what the root cause is or how to remedy. In the past, it was an issue that I ran into occasionally. However, it starts to appear more frequently.