angular2报错

一、运行ng serve的时候卡在95% emitting LicenseWebpackPlugin

放弃使用cnpm,使用yarn
删除node_modules (不须要删除project目录从新ng new)

安装yarn:npm install --global yarnnode

配置仓库:npm

npm config set registry http://registry.npmjs.org/json

yarn config set registry https://registry.yarnpkg.com/spa

若是用淘宝仓库:ip

npm config set registry https://registry.npm.taobao.orgget

yarn config set registry https://registry.npm.taobao.orgit

新建项目:ng new project --skip-installangular

安装依赖:进入project目录运行 yarn install

二、报错Local workspace file ('angular.json') could not be found.

Error: Local workspace file ('angular.json') could not be found.module

执行sudo ng update @angular/clicli

相关文章
相关标签/搜索