angular2報錯


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM