Follow the steps below, or just watch this video:
First, install Node and the Node Package Manager from the Ubuntu repository. (Note: the versions in the repository are not the latest versions, and there are several ways to install newer versions on Ubuntu. But for the purposes of developing apps in Angular, the repository versions are generally fine.)
sudo apt-get install nodejs npm
This takes a bit of time, and when it is done you can check the versions installed to ensure that they are working correctly:
node --version
npm --version
Next we use npm to install the Angular CLI. First try the stock instructions from Angular, which say to do the following:
npm install -g @angular/cli
For me, this causes a permission error. Installing with sudo seems to resolve the problem, though:
sudo npm install -g @angular/cli
We can verify the installation with:
ng version
And now Angular CLI is ready for use
No comments:
Post a Comment