繁体   English   中英

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

运行时出错: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”: “64”})
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! 埃尔诺-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 \\漫游\\故宫\\ 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 \\漫游\\故宫\\ node_modules \\ .staging \\ yallist-2cab1649 \\的package.json”
npm ERR! enoent这很可能不是npm本身的问题
npm ERR! enoent,与npm无法找到文件有关。
npm ERR! ENOENT
npm ERR! 请在任何支持请求中包括以下文件:
npm ERR! C:\\用户\\赤拉尼维\\ NPM-的debug.log

在此处输入图片说明

您应该执行npm cache clean而不是npm clear cache (请参阅https://docs.npmjs.com/cli/cache )。

关于npm WARN @angular/core@2.4.6 requires a peer of rxjs@^5.0.1 but none was installed. 关于rxjs,存在一个开放的角度cli问题 作为一项工作,您可以执行npm install -g rxjs

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

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

尝试运行npm clear cache

并且比npm install -g angular-cli

确保您已安装最新的Nodejs(LTS版本)。 尝试跟随

  1. npm我npm -g
  2. npm缓存清理
  3. npm install -g @ angular / cli

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM