准备
- 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 (启动)

本文详细介绍如何使用Node.js版本10.16.0和AngularCLI版本8.3.24搭建AngularJS8开发环境。包括安装cnpm、@angular/cli,创建项目并解决跨平台兼容性问题。
2019





