![](/img/trans.png)
[英]This version of CLI is only compatible with Angular version 5.0.0 or higher error
[英]Installing @angular/cli at version 9 but then reporting version 7
我正在嘗試將 angular/cli 的全局版本更新到版本 9,但在運行以下步驟后,我仍然看到安裝了版本 7。
步驟1
npm uninstall -g @angular/cli
第2步
npm cache clean --force
也試過
npm cache verify
第 3 步
npm install -g @angular/cli@latest
它卸載得很好,因為我在卸載后運行ng --version
我沒有看到安裝的 CLI 版本。 然而,在第 3 步之后再次運行它,我看到安裝了版本 7。
您已在全球范圍內對其進行了更新。 您是否嘗試過刪除項目文件夾中的 node_modules ?
rm -rf node_modules
npm uninstall --save-dev angular-cli
npm install --save-dev @angular/cli@latest
npm install
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.