Search code examples
javascriptnode.jswindows-10nvm

Node.js nvm exit status 145: The directory is not empty


I have Node.js version 14.18.1 installed and I want to update to 16.10.0 for compatibility for a project. To upgrade I have installed the latest version of nvm (1.1.8) and did nvm install 16.10.0. And then nvm use 16.10.0 and got the error: exit status 145: The directory is not empty. I tried looking this up, but couldn't find anyone on the internet encountering the same issue.

I have also tried adding the path at C:\Users\*user*\AppData\Roaming\nvm\settings.txt to my system environment path, but that didn't work either. Does anyone have an idea as to what might work? Thank you.


Solution

  • I solved by:

    Delete all contents of folder path: C:\Program Files\nodejs

    and try to run nvm use 16.10.0 again.