In my case, I was building my web app and I had created a javaScript file in the IDE IntelliJ. But in the folder, the file name was missing the suffix “.js”. So when I used ‘npm run dev’ command in the terminal, it failed to find the file I had created.
If it is the same for you, then just go to the folder and add the suffix “.js” in the file name.
I think it’s a bug in IntelliJ, Hopefully they may fix it later on.