npm 安装cnpm淘宝镜像时报错解决
详细报错
D:\workspace\es61> npm install -g cnpm --registry=https://registry.npm.taobao.org
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\.staging\npm-bb88aed9\node_modules\read-installed\test'
npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\node_modules\.staging\npm-bb88aed9\node_modules\abbrev
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\.staging\npm-bb88aed9\node_modules\abbrev' -> 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\.staging\abbrev-99695b0f'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-02-24T14_16_24_548Z-debug.log
PS D:\workspace\es61> npm install -g cnpm --registry=https://registry.npm.taobao.org^C^C^C^C^C^C^C^C^C^C
npm ERR! Request path contains unescaped characters npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-02-24T14_18_17_575Z-debug.log
PS D:\workspace\es61> npm install -g cnpm@5.51 --registry=https://registry.npm.taobao.org
npm ERR! code ETARGET
npm ERR! notarget No matching version found for cnpm@5.51
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist. npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-02-24T14_21_13_999Z-debug.log
PS D:\workspace\es61> npm install -g cnpm@5.5.1 --registry=https://registry.npm.taobao.org
npm ERR! code ETARGET
npm ERR! notarget No matching version found for cnpm@5.5.1
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist. npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-02-24T14_21_24_209Z-debug.log
解决
是因为cnpm 的安装版本需要 npm版本支持
1 cnpm -v 找到cnpm版本号
cnpm -v
cnpm@6.0.0 (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\lib\parse_argv.js)
npm@6.8.0 (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\lib\npm.js)
node@8.9.3 (D:\Program Files\tool\nodejs\node.exe)
npminstall@3.20.2 (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\index.js)
prefix=C:\Users\Administrator\AppData\Roaming\npm
win32 x64 10.0.14393
registry=https://registry.npm.taobao.org
2 使用命令安装npm
npm install npm@6.0.0
3 再次执行安装命令
npm install -g cnpm --registry=https://registry.npm.taobao.org
4 成功
npm 安装cnpm淘宝镜像时报错解决的更多相关文章
- npm安装cnpm淘宝镜像
npm set registry https://registry.npm.taobao.org # 注册模块镜像 npm set disturl https://npm.taobao.org/d ...
- mac下安装cnpm淘宝镜像
cnpm:官网 (事先已经安装了node,有npm)查看官网,提示安装需运行命令:npm install -g cnpm --registry=https://registry.npm.taobao. ...
- node npm 安装模块 淘宝镜像
npm --registry https://registry.npm.taobao.org info underscore
- 为什么安装了淘宝镜像,永用cnpm安装依赖包会报错,而用npm就不会?报错:cnpm : 无法加载文件 C:\Users\93457\AppData\Roaming\npm\cnpm.ps1。。。。
cnpm - 解决 " cnpm : 无法加载文件 C:\Users\93457\AppData\Roaming\npm\cnpm.ps1,因为在此系统上禁止运行脚本.有关详细信息 ... ...
- npm安装删除模块以及cnpm淘宝镜像
npm安装模块 [$ npm install xxx]利用 npm 安装xxx模块到当前命令行所在目录: [$ npm install -g xxx]利用npm安装全局模块xxx: npm 删除模块 ...
- npm更换成淘宝镜像源以及cnpm
1.需求由来 由于node安装插件是从国外服务器下载,受网络影响大,速度慢且可能出现异常.所以如果npm的服务器在中国就好了,所以我们乐于分享的淘宝团队(阿里巴巴旗下业务阿里云)干了这事.来自官网:“ ...
- npm设置为淘宝镜像地址
1. npm设置为淘宝镜像 $npm config set registry https://registry.npm.taobao.org 2. 检查一下 $npm config get regis ...
- npm切换到淘宝镜像
1. npm简介 1.1.说明:npm(node package manager)nodejs的包管理器,用于node插件管理(包括安装.卸载.管理依赖等): 1.2.使用npm安装插件:命令提示符执 ...
- npm切换成淘宝镜像源
0-前言 我们都知道node下载第三方依赖包是从国外服务器下载,不是速度奇慢就是下载异常,切换成国内的淘宝镜像源很有必要: 1-切换方法 $ npm config set registry https ...
随机推荐
- I2C(二) linux2.6
目录 I2C(二) linux2.6 总线驱动 关键结构 入口 i2c_add_adapter 硬件操作 设备驱动 入口 注册 attach_adapter eeprom_detect i2c_att ...
- 003 win7如何配置adb环境变量
1.首先右击计算机——属性——高级系统设置——环境变量: 2.弹出”环境变量“对话框,单击”新建“一个环境变量. 3.在新建系统变量里,配置变量名:Android 变量值:D:\Users\Admin ...
- Java 集合系列08之 List总结
一.List概述 1. List是一个接口,它继承于Collection接口,代表有序集合 2. ArrayList, LinkedList, Vector, Stack是List的4个实现类. Ar ...
- Spring Cloud微服务实践之路-起始
由于各种原因,公司要对现有的营销产品进行微服务化,如果可以,则对公司所有产品逐步进行微服务化. 而本人将探索这条路,很艰难,但干劲十足.整个过会记录下来,以便以后查阅. 感谢公司!感谢领导! 相关书籍 ...
- R猜拳游戏解释
R猜拳游戏解释 作者:梁 蓉 猜拳游戏大概解释: 搜集齐数据框,for循环在三个随机数里抽俩个,抽出的数据放回,继续抽取剪刀石头布,机器人出剪刀石头布,我出对应压制机器人的方法来赢取胜利,我给机器人发 ...
- Livereload or meta
静态页面布局的过程中,如果可以一边写一边看见结果,那肯定是很方便的,在最开始使用的DW中实现了这一目标,但并不是浏览器环境下.之后使用gulp中的livereload后配合chrome插件livere ...
- java实现单链接的几种常用操作
public class ListNode { public int value; public ListNode next; public ListNode(int value) { this.va ...
- vue.js学习系列-第一篇(代码)
<html> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"> ...
- 软件测试-培训的套路-log3
最新的套路!我是没了解过--下图中描述-log3 Dotest-董浩 但是我知道不管什么没有白吃的午餐而且还会给钱…如果真的有,请醒醒! 当然话又回来,套路不套路,关键看你是否需要:你如果需要我觉得是 ...
- Mac环境下Scrapy的安装
直接命令安装: $ easy_install scrapy 从 GitHub 安装: $ git clonehttps://github.com/scrapy/scrapy.git $ cd scra ...