我正在尝试安装" @ angular / cli"但我总是得到错误。我得到的错误是:
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>
如何解决这个问题?
答案 0 :(得分:0)
您实际上并未尝试安装@angular/cli
,而是尝试安装angular-cli
。你运行的命令就很明显了。
npm install -g angular-cli
这是 用于安装CLI的命令:
npm install -g @angular/cli
在尝试安装CLI之前,请确保您具备所有适当的先决条件。有关详细信息,请参阅here。