- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
First we will install the latest NodeJS, the best way to make it easy and correct is to use NVM - Node Version Manager
To minimize chances of permissions errors, you can configure npm to use a different directory. In this example, it will be a hidden directory on your home folder.
Install nvm:
To minimize chances of permissions errors, you can configure npm to use a different directory. In this example, it will be a hidden directory on your home folder.
Install nvm:
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
$ bash install_nvm.sh
- Make a directory for global installations:
mkdir ~/.npm-global
- Configure npm to use the new directory path:
npm config set prefix '~/.npm-global'
- Open or create a ~/.profile file and add this line:
export PATH=~/.npm-global/bin:$PATH
- Back on the command line, update your system variables:
source ~/.profile
Test: Download Angular-CLI globally without using sudo.npm i @angular/cli
- Get link
- X
- Other Apps
Comments
Post a Comment