In my code, I am using the nodejs fs.stat(...) on a folder. When I run that code in VSCode, I get the ENOENT error saying that folder does not exist. When I run the same code in the terminal, the folder is found and I get no error.

Folder path: "/Users/myself/Downloads"

I copied the folder path and did a "cd /Users/myself/Downloads" and it worked.

I verified in activity monitor the user running the VSCode process and that was me who is an admin.

I have other projects in VSCode and I ran them and they work fine.

I am not sure why this particular one has a problem.

0 Answers