Start-Process -Verb RunAs nvm -Args "use 16.13.0" Start-Process -Verb RunAs nvm -Args "use 14.18.1" Start-Process -Verb RunAs nvm -Args "use 12.22.7" Start-Process -Verb RunAs nvm -Args "use 10.24.1" The syntax is a bit complicated, so I created a few functions in my PowerShell profile to make the command easier to use: Function Nvm-Use10 I decided to use the Start-Process PowerShell command as a workaround: Start-Process -Verb RunAs nvm -Args "use 10.24.1" I am not comfortable having admin privileges in my terminal, and I wanted to avoid having to open another terminal window when I want to switch to a different Node.js version. The official recommendation is to use the tool from an admin terminal window. This is because the tool uses symlinks that require admin privileges to create. It was time to switch to one of these versions and start working: nvm use 10.24. I then installed all the Node.js versions that I might need to use in the near future: nvm install 10.24. After I restarted the terminal window, the nvm command was available to me. When I was done with that, I downloaded nvm-setup.zip from the NVM for Windows releases page and ran the installer from that archive. Deleting the npm and npm-cache folders from the %appdata% folder.Uninstalling Node.js from the Windows Programs & Features window.Clearing the npm cache by calling npm cache clean -force.I followed a great guide I found on Stack Overflow. Since I already had Node.js installed on my machine, it seemed like a good idea to do a full uninstall first. When I realized that I would also need to downgrade my Node.js installation, I decided to bite the bullet and install NVM for Windows. At first, it seemed like downgrading npm would suffice. I have been working on older Ionic Angular projects lately that can not be built with the latest version of Node.js.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |