Home > OS >  Why is there a nodejs directory in ubuntu subsysem when nodejs is not installed?
Why is there a nodejs directory in ubuntu subsysem when nodejs is not installed?

Time:12-25

I just installed the ubuntu subsystem. I have not installed node yet but it has a nodejs directoy under /mnt/c/Program files/nodejs. The problem is that I can run npm after installing node. It gives me this error:

enter image description here

I uninstalled and reinstalled the linux subsystem, but the directroy is always there. I tried all of the solutions online for dealing with this error but none of them worked. I can't even remove this directroy because of permissions. Even sudo-ing won't work. How can i fix this and get npm running?

CodePudding user response:

The folder you’re browsing to is actually your Windows installed Node version. You’re better off installing nvm or just using nodesource to download and install Node. NVM is my preference if you’re needing to install multiple versions for dev purposes etc. nvm

  • Related