我正在尝试安装"@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>如何解决这个问题?
发布于 2018-03-07 03:03:46
您实际上不是在尝试安装@angular/cli,而是在尝试安装angular-cli。从您运行的命令可以明显看出这一点。
npm install -g angular-cli以下是安装CLI时应使用的命令:
npm install -g @angular/cli在尝试安装CLI之前,请确保已准备好所有适当的前提条件。详情请参见here。
https://stackoverflow.com/questions/49133744
复制相似问题