安装angular-cli时的NPM错误

安装angular-cli时的NPM错误

问题描述:

我试图重新安装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),但没有。还是一样的错误。 –

我尝试了很多方法,但是在虚拟机上安装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 –