[英]Issue while installing Angular CLI on windows 11 with node version 18.12.1
我正在嘗試安裝 angular cli,我收到了這兩個警告,我擔心以后會打擾我,我不知道如何修復它,請幫助我......
C:\Users\ASUS>npm install -g @angular/cli
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
changed 231 packages, and audited 232 packages in 5s
26 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
在我嘗試查看 angular 的版本(如果已安裝)之后。 cmd 顯示此錯誤。
C:\Users\ASUS>ng --version
Error: You need to specify a command before moving on. Use '--help' to view the available commands.
嘗試命令ng v
並檢查它是否詢問有關 google 的任何問題並將 N 選為否。 如果它顯示角度版本,則表示安裝了angular/cli
我沒有具體的解決方案,但我已經用 Yarn 安裝了它
1.安裝紗線
https://classic.yarnpkg.com/lang/en/docs/install/#windows-stable在我的例子中,我選擇了 msi 下載,因為它因 npm 而失敗
安裝 Yarn Angular / cli
紗線添加@angular/cli
在環境變量中我添加路徑這個 ng root INSTALLATION_PATH\node_modules.bin
現在我在全球范圍內擁有它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.