準備
- ng --version (Node and Angular CLI version)
Node: 10.16.0
Angular CLI: 8.3.24 - node -v (NPM version)
NPM: v10.16.0
搭建
- npm install -g cnpm --registry=https://registry.npm.taobao.org
- cnpm install -g @angular/cli
- ng new angularjs8-test --skip-install
- cd angularjs8-test
- cnpm install
注意:cnpm安裝過程中提示optional install error: Package require os(darwin) not compatible with your platform,執行下列步驟:
① cnpm rebuild node-sass
② cnpm install - ng serve -o (啓動)