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

查看:27
本文介绍了错误: npm install -g angular-cli |npm 错误!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 WARN 可选跳过可选依赖:fsevents@^1.0.0 (node_modules\angular-cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup 跳过可选依赖项:fsevents@1.0.17 不受支持的平台:想要 {"os":"darwin","arch":"any"}(当前:{"os":"win32","arch":"x64"})
npm WARN @angular/core@2.4.6 需要 rxjs@^5.0.1 的对等点,但没有安装.
npm 错误!Windows_NT 10.0.14393
npm 错误!argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "angular-cli"
npm 错误!节点 v7.5.0
npm 错误!npm v4.1.2
npm 错误!路径 C:\Users\Chiranjeevi\AppData\Roaming\npm\node_modules\.staging\yallist-2cab1649\package.json.797219503
npm 错误!代码 ENOENT
npm 错误!错误号 -4058
npm 错误!系统调用重命名
npm 错误!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 错误!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 错误!enoent 这很可能不是 npm 本身的问题
npm 错误!enoent 并且与 npm 无法找到文件有关.
npm 错误!恩恩
npm 错误!请在任何支持请求中包含以下文件:
npm 错误!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(见 https://docs.npmjs.com/cli/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 的对等点,但没有安装.:有一个 关于 rxjs 的开放 angular cli 问题.作为一种解决方法,您可以执行 npm install -g rxjs.

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 错误!Windows_NT 10.0.10586的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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