簡體   English   中英

錯誤:npm install -g angular-cli | npm ERR! Windows_NT 10.0.10586

[英]Error: npm install -g angular-cli | npm ERR! Windows_NT 10.0.10586

運行時出錯:npm install -g angular-cli

C:\Windows\System32>node -v
v7.5.0
C:\Windows\System32>npm -v
4.1.2
C:\Users\Chiranjeevi>npm -v minimatch
4.1.2
-------------------------------------------------------------------------------------------
C:\Users\Chiranjeevi>npm install -g angular-cli

npm WARN不建議使用minimatch@2.0.10:請更新至minimatch 3.0.2或更高版本,以避免RegExp DoS問題
C:\\ Users \\ Chiranjeevi \\ AppData \\ Roaming \\ npm`-(空)
npm警告可選的跳過選擇性依賴性:fsevents@^1.0.0(node_modules \\ angular-cli \\ node_modules \\ chokidar \\ node_modules \\ fsevents):
npm WARN notsup跳過依賴項:fsevents@1.0.17不受支持的平台:wanted {“ os”:“ darwin”,“ arch”:“ any”}(當前:{“ os”:“ win32”,“ arch”: “64”})
npm WARN @ angular / core @ 2.4.6要求rxjs@^5.0.1的同位體,但未安裝。
npm ERR! Windows_NT 10.0.14393
npm ERR! argv“ C:\\\\ Program Files \\\\ nodejs \\\\ node.exe”“ C:\\\\ Program Files \\\\ nodejs \\\\ node_modules \\\\ npm \\\\ bin \\\\ npm-cli.js”“安裝”“ -g “” angular-cli“
npm ERR! 節點v7.5.0
npm ERR! npm v4.1.2
npm ERR! 路徑C:\\ Users \\ Chiranjeevi \\ AppData \\ Roaming \\ npm \\ node_modules \\ .staging \\ yallist-2cab1649 \\ package.json.797219503
npm ERR! 代碼ENOENT
npm ERR! 埃爾諾-4058
npm ERR! syscall重命名
npm ERR! enoent ENOENT:無此類文件或目錄,重命名為'C:\\ Users \\ Chiranjeevi \\ AppData \\ Roaming \\ npm \\ node_modules \\ .staging \\ yallist-2cab1649 \\ package.json.797219503'->'C:\\ Users \\ Chiranjeevi \\ AppData \\漫游\\故宮\\ node_modules \\ .staging \\ yallist-2cab1649 \\的package.json”
npm ERR! enoent ENOENT:無此類文件或目錄,重命名為'C:\\ Users \\ Chiranjeevi \\ AppData \\ Roaming \\ npm \\ node_modules \\ .staging \\ yallist-2cab1649 \\ package.json.797219503'->'C:\\ Users \\ Chiranjeevi \\ AppData \\漫游\\故宮\\ node_modules \\ .staging \\ yallist-2cab1649 \\的package.json”
npm ERR! enoent這很可能不是npm本身的問題
npm ERR! enoent,與npm無法找到文件有關。
npm ERR! ENOENT
npm ERR! 請在任何支持請求中包括以下文件:
npm ERR! C:\\用戶\\赤拉尼維\\ NPM-的debug.log

在此處輸入圖片說明

您應該執行npm cache clean而不是npm clear cache (請參閱https://docs.npmjs.com/cli/cache )。

關於npm WARN @angular/core@2.4.6 requires a peer of rxjs@^5.0.1 but none was installed. 關於rxjs,存在一個開放的角度cli問題 作為一項工作,您可以執行npm install -g rxjs

此外,angular cli的npm軟件包名稱已從angular-cli更改為@ angular-cli。

也就是說,以下內容可能會有所幫助: npm uninstall -g angular-cli npm cache clean npm install -g rxjs npm install -g @angular/cli

嘗試運行npm clear cache

並且比npm install -g angular-cli

確保您已安裝最新的Nodejs(LTS版本)。 嘗試跟隨

  1. npm我npm -g
  2. npm緩存清理
  3. npm install -g @ angular / cli

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM