MERN stack tutorial

Hi everyone. I was doing this tutorial (MERN Stack Course - ALSO: Convert Backend to Serverless with MongoDB Realm - YouTube) of FCC and coding along. But when in minute 23 nodemon is used, my terminal keeps giving this error:

[nodemon] Internal watch failed: EISDIR: illegal operation on a directory, watch ‘//wsl$/Ubuntu/home/sahand/Projects/Restaurant-Reviews/backend’

I understand that the EISDIR error means that the command is looking for a file but I am giving it a folder, but server.js is a file!

i’d appreciate it if anyone could tell me what is happening here.

You are inside the backend folder when running the command right?

Try adding nodemon to the dev dependencies and use it as a script inside package.json (instead of running it as a global install).

Not sure if any ambiguity exists (say a folder /server and a file server.js ) and you give nodemon the file extension with the run command if it would pick the right one or not. I have never really used it as a global install (I think it is best to avoid globals).