Remove nodeJS and npm :
https://stackoverflow.com/questions/32426601/how-can-i-completely-uninstall-nodejs-npm-and-node-in-ubuntu
sudo apt-get remove nodejs
sudo apt-get remove npm
Install latest npm : (recommneded using nvm - node version management)
https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-22-04
#Install node using nvm will also autmotically install npmTake a look and make sure you are comfortable with the changes it is making. When you are satisfied, run the command again with
| bashappended at the end. The URL you use will change depending on the latest version of nvm, but as of right now, the script can be downloaded and executed by typing:This will install the
nvmscript to your user account. To use it, you must first source your.bashrcfile:
// Install version v16.4.0
- nvm install v16.14.0
# Install angular CLIhttps://stackoverflow.com/questions/37227794/ng-command-not-found-while-creating-new-project-using-angular-cli
must install by npm or else ng command will not be found# install angular cli according to your package.json versionnpm install -g @angular/cliInstall a specific versionhttps://stackoverflow.com/questions/43344600/how-to-install-a-specific-version-of-angular-with-angular-clinpm uninstall -g angular-cli npm cache cleannpm install -g @angular/cli@12.2.13
No comments:
Post a Comment