I have installed nodejs using npm on WSL2. The node version is 16.2.0. I browsed StackOverflow on how to delete and upgrade or downgrade node on Windows and Linux but never have any answer on WSL.
Tried:
npm install -g node@10.19.0
An error message of the command says:
File exists: /home/blold/.nvm/versions/node/v16.2.0/bin/node
Remove the existing file and try again,
Use --force option with command to downgrade the node.
Tried to go to
/home/blold/.nvm/versions/node/v16.2.0/bin/nodeto delete existing files but it says it is not a directory. At least I should delete existing node files but how?Using
--forceseems not a good solution for the question.
What should I do?