使用 angular-cli 创建新项目时出错 [英] Error while creating a new project using angular-cli

查看:38
本文介绍了使用 angular-cli 创建新项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我成功安装了 angular-cli,但是当我尝试创建一个新项目时,它抛出一个错误:

I installed angular-cli successfully but when I am trying to create a new project, it is throwing an error:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.5.3 (node_modules\node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sha1-0JydEXlkEjnRuX/8YjH9zsU+FWg= integrity checksum failed when using sha1: wanted sha1-0JydEXlkEjnRuX/8YjH9zsU+FWg= but got sha1-Au9QsWhf0hcUTeZv8pFTf+AhiCg=. (81395 bytes)

npm ERR! code EINTEGRITY
npm ERR! sha1-5PZh90ZxHojsvqdqPJBbq/l9MVo= integrity checksum failed when using sha1: wanted sha1-5PZh90ZxHojsvqdqPJBbq/l9MVo= but got sha1-VmZmdoabDu7UgY26v1YHr9hYUTk=. (48762 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\raman\AppData\Roaming\npm-cache\_logs\2017-07-25T09_26_53_359Z-debug.log

Package install failed, see above.
Package install failed, see above.

我该如何解决这个错误!

How do I resolve this error!

提前致谢!

推荐答案

尝试

npm set registry https://registry.npmjs.org/
rm -rf node_modules/
npm cache clean --force
npm cache verify
npm install

或者你也可以放弃 npm 并做一个

or also you could discard npm and do a

yarn install

这篇关于使用 angular-cli 创建新项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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