vue-create 报错 command failed: yarn --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist 完美解决方案
@vue/cli 3.x 创建项目失败解决方案
报错信息
command failed: yarn --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist
报错原因
经bug修复后查明是yarn问题,yarn不能使用https://registry.npm.taobao.org源,所以报出了该错误,yarn在安装完毕后会修改默认包使用方式为yarn,而vue提供的源yarn又不支持使用,所以报错
复现bug
将C:\Users\Administrator\.vuerc文件中packageManager修改为yarn即可复现该bug
修复方法
该bug可能有一些并发原因,修复方法如下,请参考使用
前置条件
确保vue-cli,npm,node都是新版本,node在8+以上版本
方法一:清除npm缓存
npm cache clean --force
方法二:设置chromedriver
npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
方法三:修改npm,yarn源
npm install -g cnpm --registry=https://registry.npm.taobao.org
方法四:修改默认包管理器
找到C:\Users\Administrator\.vuerc这个文件
设置packageManager为npm
vue-create 报错 command failed: yarn --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist 完美解决方案的更多相关文章
- appium在android 7.0真机上运行报错command failed shell:............ps:'uiautomator"的解决方式
		
appium版本:1_4_16 在CSDN中找到相关解决的方案,根据此解决方案顺利的解决了让人惆怅的问题,再次记录. 1.找到appium安装目录下的adb.js文件,目录为:Appium\node_ ...
 - Vue.js报错Failed to resolve filter问题原因
		
Vue.js报错Failed to resolve filter问题原因 金刚 vue Vue.js js javascript 之前使用vue.js写分页功能时,写了一个过滤器,发现一个比较奇怪的错 ...
 - 解决Eclipse启动报错【Failed to create the Java Virtual Machine】
		
电脑:2G内存,WIN7 32位. 启动adt-bundle-windows-x86-20140702\eclipse\eclipse.exe时,报错[Failed to create the Jav ...
 - ionic 打包 报错Execution failed for task ':processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt
		
在platform --> android目录下找到build.gradle文件,打开并在def promptForReleaseKeyPassword() {...}函数前加入以下内容: 完整 ...
 - docker—tomcat 报错:Failed to get D-Bus connection: Operation not permitted
		
docker search centos 查系统镜像 docker pull docker.io/centos 进入容器 [root@git opt]# docker images REPOSIT ...
 - svn报错cleanup failed–previous operation has not finished; run cleanup if it was interrupted的解决办法
		
今天在svn提交的时候它卡顿了一下,我以为已经提交完了,就按了一下,结果就再也恢复不了,也继续不了了... 报错 cleanup failed–previous operation has not f ...
 - Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
		
Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' ...
 - docker报错:Failed to restart docker.service: Unit not found.
		
前言:我之前安装好docker了,但是关机重启后,发现docker就没了 报错:Failed to restart docker.service: Unit not found. 解决方法: 1. ...
 - 报错:Failed on local exception: Host Details : local host is: "master/192.168.52.26"; dest
		
报错现象 Failed on local exception: com.google.protobuf.InvalidProtocolBufferException: Protocol message ...
 
随机推荐
- API---注册表编程
			
首先来认识一下键,项,值吧: 左边有五个根键: HKEY_CLASSES_ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE HKEY_USER HKEY_CURREN ...
 - Cymothoa后门工具
			
Cymothoa是一款隐秘的后门工具. 发现网上对于Cymothoa的文章并不是很多,可是Cymothoa又是一款非常强大的后门工具,这里记录下Cymothoa的使用笔记. Cymothoa 是一款可 ...
 - HMLT  clear 属性
			
原文 : http://www.zhangxinxu.com/wordpress/2014/06/understand-css-clear-left-right-and-use/ clear 的四个值 ...
 - 为程序员节日献礼--2019中国.NET开发者峰会主题内容发布
			
2019年10月24日,组委会正式发布了China .NET Conf 2019中国 .NET 开发者峰会的主题内容. 2014年微软组织并成立.NET基金会,微软在成为主要的开源参与者的道路上又前进 ...
 - PowerShell渗透--Empire(三)
			
会话注入 我们可以使用usemodule management/psinject模块来进程注入,获取权限 设置下Listeners和ProcID这2个参数,这里的ProcID就是之前的CMD的pid, ...
 - [洛谷P3709]大爷的字符串题
			
题目传送门 不用管它随机什么的,就用贪心的思想去想, 会发现这道题的实质是:求查询区间众数出现次数. 莫队即可解决. 注意字符集1e9,要离散化处理. #include <bits/stdc++ ...
 - Rust入坑指南:千人千构
			
坑越来越深了,在坑里的同学让我看到你们的双手! 前面我们聊过了Rust最基本的几种数据类型.不知道你还记不记得,如果不记得可以先复习一下.上一个坑挖好以后,有同学私信我说坑太深了,下来的时候差点崴了脚 ...
 - Java 根据权重获取数据  基础 极简 准确率高
			
package sl; import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.ut ...
 - mySQL的安装过程---二进制和源码安装
			
安装 mysql 源码包安装 优化基础源 [root@db03 ~]# vim /etc/yum.repos.d/CentOS-Base.repo 安装依赖包 [root@db03 ~]# yum i ...
 - laravel6.0控制器-资源控制器
			
控制器:控制器用来处理业务的,不应该处理逻辑,如果是小项目可以把逻辑写到控制器里,大点的项目应该抽离出来业务处理层如下:services业务处理层:比如:获取值,验证值,异常捕获命名规则:控制器名:用 ...