The Go Blog

Angular 6 first

bantana
1 June 2018

install node without sudo on osx

cat ~/.bash_profile:

# npm global reset to user directoy
if [ -d ~/.npm-global ]; then
    export PATH=~/.npm-global/bin:$PATH
    # export NPM_CONFIG_PREFIX=~/.npm-global
else
    mkdir ~/.npm-global
    npm config set prefix '~/.npm-global'
    npm i -g npm
    source ~/.bash_profile
fi
# yarn bin ~/.yarn/bin
if [ -d ~/.yarn/bin ]; then
    PATH=$PATH:$HOME/.yarn/bin
fi

install angular-cli

$ npm i -g @angular/cli

or

$ yarn global add @angular/cli

config ng use yarn as package Manager

$ ng config --global
{
  "version": 1,
  "cli": {
    "packageManager": "yarn"
  },
  "newProjectRoot": "./",
  "schematics": {},
  "architect": {},
  "projects": {}
}

resources

  • Development
VS Code
Angular-cli
Augury

Related articles