While in my /Desktop folder and I type in terminal npm root' I get the path/Users/Cathy/node_modules`.
However, node_modules doesn't exist, so that path is incorrect.
If I'm in the /Users folder and I type in terminal npm root' I get the path/Users/node_modules`. That folder doesn't exist either.
I have no idea when that false path got set or how they got set. Or if the folder doesn't exist, why does npm root report it exists??
If I'm in a project I'm working on, npm root takes me to the right location where my modules live.
So, this is not causing me problems, but I want to understand what's going on. (I don't think I ever did an npm install within those folders which are closer to the root directory.)
Thanks.
npm root prints the location of node_module folder effective for a particular location.
This means output is what will be used for installation. It does not mean if anything is installed there. It is for just for user support.