2022年1月17日 星期一

How to Uninstall and Reinstall Angular cli?

Uninstall Angular CLI:
npm uninstall -g @angular/cli

Clear Cache:
npm cache clean --force
npm cache verify

Install Angular CLI:
npm install -g @angular/cli

ionic project create

ionic start test blank --type=ionic-angular --capacitor
cd test
ionic build
ionic cordova platform add android
ionic cap add android



or
ionic start test blank --type=ionic-angular --cordova
cd test
ionic build
ionic cordova platform add android
ionic cap add android

Ionic repair



C: \ionic repair



[INFO] ionic repair will do the following:

- Remove node_modules/ and package-lock.json
- Run npm i to restore dependencies
- Remove platforms/ and plugins/
- Run cordova prepare to restore platforms and plugins

Node.js 重新安裝

第 1 步:從系統中卸載 NodeJs 應用 

第 2 步:轉到 programFiles/nodejs ->刪除 node_modules 文件夾  

第 3 步:重新安裝 NodeJs 應用 (Download)