2016-09-20 206 views
1

我試圖重新安裝angular-cli工具來獲取最新版本。在安裝之前,我確實升級了優雅的fs,強韌的cookies和lodash。現在,當我嘗試安裝角CLI全球它給了我這個錯誤:安裝angular-cli時的NPM錯誤

(node: 7736) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit 

我很驚訝,因爲它沒有發生之前。我無法安裝該版本的angular-cli。我試圖重新安裝NodeJS 6.6.0。此外,我試圖谷歌這個問題,但沒有什麼對我有用。聽到類似聽衆的流行包,我感到很驚訝。

在我得到這些錯誤的安裝結束:

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Flyrell\AppData\Roaming\npm\node_mo 
dules\angular-cli' -> 'C:\Users\Flyrell\AppData\Roaming\npm\node_modules\.angular-cli.DELETE' 
npm ERR!  at moveAway (C:\Users\Flyrell\AppData\Roaming\npm\node_modules\npm\lib\install\action\f 
inalize.js:38:5) 
npm ERR!  at destStatted (C:\Users\Flyrell\AppData\Roaming\npm\node_modules\npm\lib\install\actio 
n\finalize.js:27:7) 
npm ERR!  at FSReqWrap.oncomplete (fs.js:123:15) 
npm ERR! 
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Flyrell\AppData\Roaming\npm\node_mo 
dules\angular-cli' -> 'C:\Users\Flyrell\AppData\Roaming\npm\node_modules\.angular-cli.DELETE' 
npm ERR!  at Error (native) 
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Flyrell\AppData\Roaming\npm\node_m 
odules\angular-cli' -> 'C:\Users\Flyrell\AppData\Roaming\npm\node_modules\.angular-cli.DELETE' 
npm ERR!  at moveAway (C:\Users\Flyrell\AppData\Roaming\npm\node_modules\npm\lib\install\action\f 
inalize.js:38:5) 
npm ERR!  at destStatted (C:\Users\Flyrell\AppData\Roaming\npm\node_modules\npm\lib\install\actio 
n\finalize.js:27:7) 
npm ERR!  at FSReqWrap.oncomplete (fs.js:123:15) 
npm ERR! 
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Flyrell\AppData\Roaming\npm\node_mo 
dules\angular-cli' -> 'C:\Users\Flyrell\AppData\Roaming\npm\node_modules\.angular-cli.DELETE' 
npm ERR!  at Error (native) 
npm ERR! 
npm ERR! Please try running this command again as root/Administrator. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\Windows\system32\npm-debug.log 
npm ERR! code 1 

我運行的cmd.exe作爲管理員,所以我真的不能找到個e-解決什麼都可以錯這個。其他全球或本地安裝是成功的。

+0

除了作爲管理員運行,npm可能無法寫入這些文件的另一個原因是,他們正在使用的地方。也許檢查一下嗎? –

+0

沒有打開。我試圖安裝它,但沒有運行任何東西,也沒有任何無用的服務或進程。我也嘗試了最新的Kali Linux(debian),但沒有。還是一樣的錯誤。 –

回答

1

我嘗試了很多方法,但是在虛擬機上安裝Windows 7並在其上安裝了最新的Nodejs後,沒有任何東西可以用於我。然後使用npm我安裝了角/ cli和一切正常,在Windows 7上:)

即使在Windows 7中的實際電腦它運作良好,所以我想它有一些Windows,Mac或Linux版本的問題和Windows 7是最有效的...

+0

我有它安裝在Win 7 64x,但它不工作,所以我安裝它在Win 10 64x,現在它的工作,但仍然顯示「EventEmitter錯誤」......奇怪。 –

+0

你的節點版本和npm版本是什麼? –

+0

最新...我現在還不確定... node是6.6.0,npm可能是3.10.7 –