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 ...
随机推荐
- PHP 组件注册的例子
<?php namespace Test; abstract class Plugin { protected $pluginName = null; abstract public funct ...
- Java获取文件中视频的时长
public void ReadVideoTime(String path) { long sum = 0; long num = 0; File source = new File(path[i]) ...
- MyBatis 开发手册
这一遍看Mybatis的原因是怀念一下去年的 10月24号我写自己第一个项目时使用全配置文件版本的MyBatis,那时我们三个人刚刚大二,说实话,当时还是觉得MyBatis挺难玩的,但是今年再看最新版 ...
- POJ 1062 昂贵的聘礼(带限制条件的dijkstra)
题目网址:http://poj.org/problem?id=1062 题目: 昂贵的聘礼 Time Limit: 1000MS Memory Limit: 10000K Total Submis ...
- webpack 打包 todolist 应用
写在前面的话: 一直想着手动配置webpack实现应用,正好最近这段时间比较空闲,就写了一个通过webpack打包实现todolist的简单应用.本文内容包括:通过webpack打包css,html ...
- halcon小结
持更 应用范围 (罗列自官方帮助文档,以后有空了按照需求展开叙述) 1. 安全系统 2. 表面检测 3. 定位 4. 二维测量比较 5. 二维码识别 6. 二维位置定位 7. 二维物体识别 8. 光学 ...
- 罕见的coredump了
最近,项目在越南版删档测试的时候,发生了罕见的coredump,简单记一点排查日志 目前的敏感词过滤是在C层做判定的,先后经过几个项目考验,模块算是比较稳定了.越南版有个需求,需要将敏感词里的空格去掉 ...
- Java类型信息(RTTI和反射)
要想在IT领域站得住脚,必须得不断地学习来强化自己,但是学过的技术不实践很容易便被遗忘,所以一直都打算开个博客,来记录自己学的知识,另外也可以分享给有需要的人! 最近在学习反射,为了更好地理解反射,就 ...
- < Window10更新后VWwareWorkstationPro无法运行(显示更新至新版本) >
< Window10更新后VWwareWorkstationPro无法运行(显示更新至新版本) > 问题描述 我的Win10在国庆节后更新了微软发布的新补丁,由于当前正在上操作系统课,用到 ...
- Spring Cloud ---- 服务消费与负载均衡(Rest + Ribbon )
上一篇主要写了基于Eurake的服务的注册,主要就是创建注册中心,创建服务者,将服务者注册到注册中心,完成服务的暴露.这一篇主要写服务的消费与服务消费的负载均衡. 服务的调用方式有两种,Rest + ...