Showing posts with label nvm. Show all posts
Showing posts with label nvm. Show all posts

7.14.2020

Use nvm For Managing Dev Environments For Any Version of Angular

Install nodejs
1. Install xcode
$ xcode-select --install
2. Install nvm
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
3. Open another bash session to get settings from nvm install
4. List installed node versions
$ nvm list
5. Or list from the cloud (last 9 versions)
$ nvm ls-remote | tail -n9
6. Install v14.5.0
$ nvm install v14.5.0
7. Setup this version as default
$ nvm use v14.5.0
$ nvm alias default v14.5.0
8. Check node version
$ node -v
v14.5.0
9. Update npm
$ npm install -g npm
10. Check npm version
$ npm -v
6.14.6

Install yarn package manager
1. $ npm install -g yarn

Install angular cli on local project
1. Go to project base directory
$ cd ./project/ui
2. Add angular cli (with versioning if needed)
$ yarn add @angular/cli@9.1.12
3. Check version
$ ng --version
Angular CLI: 9.1.12
Node: 14.5.0
OS: darwin x64
Angular: 9.1.12