1.持久使用

npm config set registry https://registry.npm.taobao.org

// 配置后可通过下面方式来验证是否成功
npm config get registry

2.通过cnpm使用

npm install -g cnpm --registry=https://registry.npm.taobao.org

结果怎么安装都失败,就尝试以下命令就好了。(本来想把错误贴上来的,结果把log日志删了,无奈...)

首先输入以下命令并回车

npm set registry https://registry.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
npm cache clean --force # 清空缓存

然后再

npm install -g cnpm --registry=https://registry.npm.taobao.org

npm安装cnpm报错的更多相关文章

  1. mac系统 下 npm 安装 bower报错

    在mac终端运行 sudo npm install -g bower (安装之前你要确定你已经成功安装了node 和 git) 然后会报错 like this: npm ERR! Darwin 15. ...

  2. 处理npm安装模块报错01

    报错:Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon_tmp' 解决:sudo cnpm in ...

  3. code EINTEGRITY,npm安装时候报错

    解决方法: 1.如果有package-lock.json文件,就删掉 2.管理员权限进入cmd 3.执行npm cache clean --force 4.之后再npm install 有时候网不好也 ...

  4. npm 安装vue 报错Failed at the chromedriver@2.46.0 install script 'node install.js'

    原因一般是下载源被封了,我们连接淘宝的下载源下载: npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/d ...

  5. npm 安装vue 报错Failed at the chromedriver@2.34.0 install script 'node install.js'

    提示版本不够,后来百度到,在你的vue项目包下执行: npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/ ...

  6. npm安装cnpm时候报错code EINTEGRITY

    npm安装cnpm时候报错code EINTEGRITY错误展示 PS C:\Users\by\Desktop\element_ui_demo> npm install --g  npmnpm ...

  7. 安装hexo报错(npm WARN deprecated swig@1.4.2: This package is no longer maintained),已解决

    问题:在使用npm安装hexo时报错 $ npm install -g hexo npm WARN deprecated swig@1.4.2: This package is no longer m ...

  8. 解决vue安装less报错Failed to compile with 1 errors的问题

    1.创建vue项目后安装less,执行 npm install less less-loader --save-dev 下载版本为:less-loader@6.1.0 , less@3.11.3,重启 ...

  9. vue项目初始化时npm run dev报错webpack-dev-server解决方法

    vue项目初始化时npm run dev报错webpack-dev-server解决方法 原因:这是新版webpack存在的BUG,卸载现有的新版本webpack,装老版本就好webpack-dev- ...

随机推荐

  1. windows使用笔记-google-chrome下载地址

    我的邮箱地址:zytrenren@163.com欢迎大家交流学习纠错! google-chrome下载地址:https://www.google.cn/intl/zh-CN/chrome/

  2. 【代码笔记】Web-ionic-卡片

    一,效果图. 二,代码. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> ...

  3. 为什么radio没有出现单选效果?

    原因是radio一定要设置相同的name,如下: <input type="radio" name="yunsuan" checked="che ...

  4. Android 将数据写入Execl格式导出U盘、发送邮件

    创建Execl.写入Execl数据.导入U盘 public WriteExcel(Context mContext){ this.mContext = mContext; } // 创建excel表 ...

  5. Spooling Directory Source使用技巧

    1.使用文件原来的名字 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 a1.sources=r1   a1.sinks=k1   a1.sources.r1.ty ...

  6. Python-初识模块

    #系统自带的模块 import sys print(sys.path)#打印环境变量 print(sys.argv)#打印绝对路径 import os #cmd_res = os.system(&qu ...

  7. 利用python中的gensim模块训练和测试word2vec

    word2vec的基础知识介绍参考上一篇博客和列举的参考资料. 首先利用安装gensim模块,相关依赖如下,注意版本要一致: Python >= 2.7 (tested with version ...

  8. The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured

    springboot 8080端口被占用报错:The Tomcat connector configured to listen on port 8080 failed to start. The p ...

  9. .net core HttpContext(Http上下文)

    在.NET Core中,只有Controller才能直接使用 HttpContext ,其他地方需要通过HttpContextAccessor来访问

  10. [cb]扩展Hierarchy 添加二级菜单

    目地 这篇博客教大家如何扩展Hierarchy 默认的Hierarchy 在Unity的Edior编辑器中,默认的Hierarchy如下 扩展的Hierarchy 扩展示例 MyInitOnLoad脚 ...