2017-02-04 136 views
0

Error while running: npm install -g angular-cli错误:npm install -g angular-cli | npm ERR! Windows_NT 10.0.10586

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弃用[email protected]:请升级到3.0.2 minimatch或更高,以避免正则表达式的DoS问题
C:\用户\赤拉尼维\应用程序数据\漫游\ NPM ' - (空)
NPM WARN可选SKIPPING可选依赖:[email protected]^1.0.0(node_modules \角CLI \ node_modules \ chokidar \ node_modules \ fsevents):
NPM WARN notsup跳绳可选依赖:对于不支持的平台[email protected]:想要{“os”:“darwin”,“arch”:“任何”}(当前:{“os”:“win32”,“arch”:“x64”})
npm WARN @安固lar/[email protected]需要[email protected]^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”“install”“-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! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT:no such file or directory,rename'C:\ Users \ Chiranjeevi \ AppData \ Roaming \ npm \ node_modules \ .staging \ yallist-2cab1649 \ package.json.797219503' - >'C:\ Users \ Chiranjeevi \ AppData \ Roaming \ npm \ node_modules \ .staging \ yallist-2cab1649 \ package.json'
npm ERR! enoent ENOENT:no such file or directory,rename'C:\ Users \ Chiranjeevi \ AppData \ Roaming \ npm \ node_modules \ .staging \ yallist-2cab1649 \ package.json.797219503' - >'C:\ Users \ Chiranjeevi \ AppData \ Roaming \ npm \ node_modules \ .staging \ yallist-2cab1649 \ package.json'
npm ERR! enoent这很可能不是npm本身的问题
npm ERR!并且与npm无法找到文件有关。
npm ERR! enoent
npm ERR!请在任何支持请求中包含以下文件:
npm ERR! C:\用户\赤拉尼维\ NPM-的debug.log

enter image description here

回答

0

尝试运行npm clear cache

,比npm install -g angular-cli

2

你应该执行npm cache clean而不是npm clear cache(见https://docs.npmjs.com/cli/cache)。

关于npm WARN @angular/[email protected] requires a peer of [email protected]^5.0.1 but none was installed.:有一个open angular cli issue concerning rxjs。作为工作区,您可以执行npm install -g rxjs

此外,角度cli的npm包名称已从角度cli更改为@ angular-cli。

也就是说,下面可能会有所帮助: npm uninstall -g angular-cli npm cache clean npm install -g rxjs npm install -g @angular/cli

+0

'NPM安装-g rxjs',就足以让我 – yunandtidus

+0

NPM ERR! enoent ENOENT:no such file or directory,rename'C:\ Users \ Chiranjeevi \ AppData \ Roaming \ npm \ node_modules \ .staging \ css-parse-3e224c20 \ package.json.27297876' - >'C:\ Users \ Chiranjeevi \应用程序数据\漫游\ NPM \ node_modules \ .staging \ CSS-解析-3e224c20 \包。JSON” – Chiranjeevi

相关问题