错误: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

查看:122
本文介绍了错误:npm install -g angular-cli |npm ERR!Windows_NT 10.0.10586的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行时出错:npm install -g angular-cli

Error while running: 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":"x64"})
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!errno -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\ Roaming \ npm \ 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\ Roaming \ npm \ node_modules \ .staging \ yallist-2cab1649 \ package.json'
npm ERR!enoent这很可能不是npm本身的问题
npm ERR!enoent,与npm无法找到文件有关.
npm ERR!enoent
npm ERR!请在支持请求中包括以下文件:
npm ERR!C:\ Users \ Chiranjeevi \ npm-debug.log

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
C:\Users\Chiranjeevi\AppData\Roaming\npm `-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\angular-cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN @angular/core@2.4.6 requires a peer of rxjs@^5.0.1 but none was installed.
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! node v7.5.0
npm ERR! npm v4.1.2
npm ERR! path C:\Users\Chiranjeevi\AppData\Roaming\npm\node_modules\.staging\yallist-2cab1649\package.json.797219503
npm ERR! code 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 This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Chiranjeevi\npm-debug.log

推荐答案

您应该执行 npm cache clean 而不是 npm clear cache (请参阅

You should execute npm cache clean instead of npm clear cache (see https://docs.npmjs.com/cli/cache).

关于 npm WARN @ angular/core @ 2.4.6需要一个rxjs@^5.0.1的同位体,但未安装任何同位体.:有一个

Regarding npm WARN @angular/core@2.4.6 requires a peer of rxjs@^5.0.1 but none was installed.: There is an open angular cli issue concerning rxjs. As a workaraound, you can execute npm install -g rxjs.

此外,angular cli的npm软件包名称已从angular-cli更改为@ angular-cli.

Additionally, the npm package name for angular cli changed from angular-cli to @angular-cli.

也就是说,以下内容可能会有所帮助:npm卸载-g angular-clinpm缓存清理npm install -g rxjsnpm install -g @ angular/cli

That is, the following might help: npm uninstall -g angular-cli npm cache clean npm install -g rxjs npm install -g @angular/cli

这篇关于错误:npm install -g angular-cli |npm ERR!Windows_NT 10.0.10586的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆