首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法安装angular cli如何解决这个问题?

无法安装angular cli如何解决这个问题?
EN

Stack Overflow用户
提问于 2018-03-06 22:55:56
回答 1查看 299关注 0票数 1

我正在尝试安装"@angular/cli“,但总是出现错误。我得到的错误是:

代码语言:javascript
复制
PS C:\Windows\system32> npm install -g angular-cli
npm WARN deprecated angular-cli@1.0.0-beta.28.3: angular-cli has been renamed to @angular/cli. Please update your dependencies.
npm WARN deprecated gulp-util@3.0.7: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN @angular/core@2.4.10 requires a peer of rxjs@^5.0.1 but none was installed.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: tsickle@0.2.5 (node_modules\angular-cli\node_modules\@angular-cli\ast-tools\node_modules\tsickle):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\MB112830\AppData\Roaming\npm\node_modules\.staging\tsickle-44cda995\README.md'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sass-graph@2.2.4 (node_modules\angular-cli\node_modules\sass-graph):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\MB112830\AppData\Roaming\npm\node_modules\.staging\sass-graph-ec58f1a8\parse-imports.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.6.1 (node_modules\angular-cli\node_modules\@ngtools\webpack\node_modules\webpack-sources\node_modules\source-map):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\MB112830\AppData\Roaming\npm\node_modules\.staging\source-map-89941291\lib\source-map-consumer.js'

npm ERR! code EINTEGRITY
npm ERR! sha1-6ooR4hHZUkuJmZRf5WRUgaUf30Y= integrity checksum failed when using sha1: wanted sha1-6ooR4hHZUkuJmZRf5WRUgaUf30Y= but got sha1-RdJf56SKQmci4uL2oIDhtyGLmVA=. (9149 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\MB112830\AppData\Roaming\npm-cache\_logs\2018-03-06T14_49_52_416Z-debug.log
PS C:\Windows\system32>

如何解决这个问题?

Full log file

EN

回答 1

Stack Overflow用户

发布于 2018-03-07 03:03:46

您实际上不是在尝试安装@angular/cli,而是在尝试安装angular-cli。从您运行的命令可以明显看出这一点。

代码语言:javascript
复制
npm install -g angular-cli

以下是安装CLI时应使用的命令:

代码语言:javascript
复制
npm install -g @angular/cli

在尝试安装CLI之前,请确保已准备好所有适当的前提条件。详情请参见here

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49133744

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档