mac上通过npm安装cordova失败
2015-07-13 16:04
477 查看
在mac上构建cordova开发环境时:
sudo npm install -g cordova,出现如下错误:
npm
ERR! Darwin 14.0.0
npm
ERR!
argv "node" "/usr/local/bin/npm" "install" "-g" "cordova"
npm
ERR!
node v0.12.7
npm
ERR!
npm v2.11.3
npm
ERR! shasum check failed for /tmp/npm-971-2c493ef3/registry.npmjs.org/cordova-app-hello-world/-/cordova-app-hello-world-3.9.0.tgz
npm
ERR! Expected: 5866d8fed5582686c68ec59a6d1097c4ec0fcc4b
npm
ERR! Actual: 64cde365d38ba8c33b0d854af07c738bbd86488d
npm
ERR! From: https://registry.npmjs.org/cordova-app-hello-world/-/cordova-app-hello-world-3.9.0.tgz
npm
ERR!
npm
ERR! If you need help, you may report this error at:
npm
ERR! <https://github.com/npm/npm/issues>
npm
ERR! Please include the following file with any support request:
npm
ERR! /Users/sunchongguo/npm-debug.log
提示叫校验码不正确,处理办法如下(我使用的第一种)
以下转自他人博客,我采用的第一种
转载▼
镜像使用方法(三种办法任意一种都能解决问题,建议使用第三种,将配置写死,下次用的时候配置还在):
1.通过config命令
2.命令行指定
3.编辑
sudo npm install -g cordova,出现如下错误:
npm
ERR! Darwin 14.0.0
npm
ERR!
argv "node" "/usr/local/bin/npm" "install" "-g" "cordova"
npm
ERR!
node v0.12.7
npm
ERR!
npm v2.11.3
npm
ERR! shasum check failed for /tmp/npm-971-2c493ef3/registry.npmjs.org/cordova-app-hello-world/-/cordova-app-hello-world-3.9.0.tgz
npm
ERR! Expected: 5866d8fed5582686c68ec59a6d1097c4ec0fcc4b
npm
ERR! Actual: 64cde365d38ba8c33b0d854af07c738bbd86488d
npm
ERR! From: https://registry.npmjs.org/cordova-app-hello-world/-/cordova-app-hello-world-3.9.0.tgz
npm
ERR!
npm
ERR! If you need help, you may report this error at:
npm
ERR! <https://github.com/npm/npm/issues>
npm
ERR! Please include the following file with any support request:
npm
ERR! /Users/sunchongguo/npm-debug.log
提示叫校验码不正确,处理办法如下(我使用的第一种)
以下转自他人博客,我采用的第一种
npm 使用国内镜像的方法
转载▼
镜像使用方法(三种办法任意一种都能解决问题,建议使用第三种,将配置写死,下次用的时候配置还在):
1.通过config命令
npm config set registry http://registry.cnpmjs.org npm info underscore (如果上面配置正确这个命令会有字符串response)
2.命令行指定
npm --registry http://registry.cnpmjs.org info underscore
3.编辑
~/.npmrc加入下面内容
registry = http://registry.cnpmjs.org 4、修改全局模块安装目录
npm config set prefix "D:\node\node-global" npm config set cache "D:\node\node-cache"
相关文章推荐
- 开源工作流BPM软件JFlow安装配置视频教程
- ffmpeg将视频每帧画面保存为PPM格式图片,使用最新的ffmpeg官网15-7-2日更新的版本
- 《产品经理的20堂必修课》
- 产品经理如何赢得开发人员的尊重和支持?-摘自infoq
- GDI绘图中的映射模式CDC::SetMapMode()
- 我的产品经理求职之路——如何编写产品分析报告
- 我的产品经理求职之路——确定职业方向
- Testing Is the Engineering Rigor of Software Development
- 一分钟理解APM,把流失的用户找回来
- 一分钟理解APM,把流失的用户找回来
- 一分钟理解APM,把流失的用户找回来
- 【一些事晚报】腾讯产品经理:手把手教你做工作交接
- System Center 2012 R2实例3—SCOM之SharePoint全方位监视16—APM监视
- 解决RPM包依赖的几种方法
- 转载:Pixhawk源码笔记六:源码预览与APM:Copter程序库
- LeapMotion系统概述
- 转载:Pixhawk源码笔记二:APM线程
- .Net 三款工作流引擎比较:WWF、netBPM 和 ccflow
- npm常用命令
- YUM、RPM 与APT 、DPKG 常用等价命令