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 ...
随机推荐
- docker etcd
etcd是CoreOS团队于2013年6月发起的开源项目,它的目标是构建一个高可用的分布式键值(key-value)数据库,用于配置共享和服务发现 etcd内部采用raft协议作为一致性算法,etcd ...
- Python高级笔记(四) -- 多继承_方法解析顺序表MRO
1. 多继承以及MRO顺序 1.1 单独调用父类的方法 # -*- encoding=utf-8 -*- class Parent(object): def __init__(self, name): ...
- MySQL学习笔记(七)使用AutoMySQLBackup工具自动备份MySQL数据库
1.下载 wget https://nchc.dl.sourceforge.net/project/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20 ...
- [Reinforcement Learning] Model-Free Prediction
上篇文章介绍了 Model-based 的通用方法--动态规划,本文内容介绍 Model-Free 情况下 Prediction 问题,即 "Estimate the value funct ...
- SQL server存储过程,触发器,游标相关实例
use MySchool go alter proc P_stu as select AVG(StudentResult)as 平均分 from Result select * from Result ...
- HDU-1028 Ignatius and the Princess III(生成函数)
题意 给出$n$,问用$1$到$n$的数字问能构成$n$的方案数 思路 生成函数基础题,$x^{n}$的系数即答案. 代码 #include <bits/stdc++.h> #define ...
- temp 和 tmp 文件
TMP和TEMP文件是各种软件或系统产生的临时文件,也就是常说的垃圾文件.Windows产生的临时文件,本质上和虚拟内存没什么两样,只不过临时文件比虚拟内存更具有针对性,单独为某个程序服务而已.而它的 ...
- python面试题一个字符串是否由重复的子字符串组成
一,给定一个非空的字符串,判断它是否可以由它的一个子串重复多次构成.给定的字符串只含有小写英文字母,并且长度不超过10000. 输入: "abab" 输出: True 解释: 可由 ...
- recurrent model for visual attention
paper url: https://papers.nips.cc/paper/5542-recurrent-models-of-visual-attention.pdf year: 2014 abs ...
- 如何使用Linux的Crontab定时执行PHP脚本的方法[转载]
首先说说cron,它是一个linux下的定时执行工具.根用户以外的用户可以使用 crontab 工具来配置 cron 任务.所有用户定义的 crontab 都被保存在/var/spool/cron 目 ...