1、運行ng serve的時候卡在95% emitting LicenseWebpackPlugin
放棄使用cnpm,使用yarn
刪除node_modules (不需要刪除project目錄重新ng new)
安裝yarn:npm install --global yarn
配置倉庫:
npm config set registry http://registry.npmjs.org/
yarn config set registry https://registry.yarnpkg.com/
如果用淘寶倉庫:
npm config set registry https://registry.npm.taobao.org
yarn config set registry https://registry.npm.taobao.org
新建項目:ng new project --skip-install
安裝依賴:進入project目錄運行 yarn install
2、報錯Local workspace file ('angular.json') could not be found.
Error: Local workspace file ('angular.json') could not be found.
執行sudo ng update @angular/cli