@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这个文件

设置packageManagernpm

vue-create 报错 command failed: yarn --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist 完美解决方案的更多相关文章

  1. appium在android 7.0真机上运行报错command failed shell:............ps:'uiautomator"的解决方式

    appium版本:1_4_16 在CSDN中找到相关解决的方案,根据此解决方案顺利的解决了让人惆怅的问题,再次记录. 1.找到appium安装目录下的adb.js文件,目录为:Appium\node_ ...

  2. Vue.js报错Failed to resolve filter问题原因

    Vue.js报错Failed to resolve filter问题原因 金刚 vue Vue.js js javascript 之前使用vue.js写分页功能时,写了一个过滤器,发现一个比较奇怪的错 ...

  3. 解决Eclipse启动报错【Failed to create the Java Virtual Machine】

    电脑:2G内存,WIN7 32位. 启动adt-bundle-windows-x86-20140702\eclipse\eclipse.exe时,报错[Failed to create the Jav ...

  4. ionic 打包 报错Execution failed for task ':processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt

    在platform --> android目录下找到build.gradle文件,打开并在def promptForReleaseKeyPassword() {...}函数前加入以下内容: 完整 ...

  5. 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 ...

  6. svn报错cleanup failed–previous operation has not finished; run cleanup if it was interrupted的解决办法

    今天在svn提交的时候它卡顿了一下,我以为已经提交完了,就按了一下,结果就再也恢复不了,也继续不了了... 报错 cleanup failed–previous operation has not f ...

  7. 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>' ...

  8. docker报错:Failed to restart docker.service: Unit not found.

    前言:我之前安装好docker了,但是关机重启后,发现docker就没了 报错:Failed to restart docker.service: Unit not found.   解决方法: 1. ...

  9. 报错: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 ...

随机推荐

  1. django渲染高阶

    08.16自我总结 django渲染高阶 一.利用母版渲染 1.创建母版文件 如:stamper.html <!DOCTYPE html> <html lang="en&q ...

  2. NoticeBoard

    本人蒟蒻,请轻点虐. 本人是一个即将退役的蒟蒻. 有些题目和模拟赛用密码保护起来了,请小伙伴们不要猜了,猜不出来的.想知道大佬们如果想查看可以直接找我问,您们高抬贵眼会让我受宠若惊. 哇终于有人找我要 ...

  3. “selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities“解决办法

    问题: 原因:firefox浏览器版本和浏览器驱动版本不匹配 解决办法:卸载高版本浏览器,安装低版本浏览器 下载地址:http://ftp.mozilla.org/pub/firefox/releas ...

  4. git jenkins 部署java项目

    1.Java项目部署基本概述:  1.什么是Java项目?  2.为什么Java项目需要使用Maven编译?  3.手动实现Java项目构建?  4.手动实现Java项目架构图? 源码包   jar包 ...

  5. jQuery的原生替代

    jQuery的原生替代,参考自你不需要jQuery,对其进行了更清晰的总结与分类,现代游览器基本都支持(ie10+以上),只整理了最简洁实用的原生代码,过分累赘的实现没有加入 元素获取 jQuery ...

  6. 设计模式(二十三)Interpreter模式

    在Interpreter模式中,程序要解决的问题会被用非常简单的“迷你语言”表述出来,即用“迷你语言”编写的“迷你程序”把具体的问题表述出来.迷你程序是无法单独工作的,还需要用java语言编写一个负责 ...

  7. 一个简单的Post Get请求

    WWW请求 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; u ...

  8. fenby C语言 P19

    #include <stdio.h> int main(){ int i,j; for(i=1;i<=8;i++) { for(j=1;j<=i;j++) { printf(& ...

  9. ASP.NET Core如何使用压缩中间件提高Web应用程序性能

    前言 压缩可以大大的降低我们Web服务器的响应速度,压缩从而提高我们网页的加载速度,以及节省一定的带宽. 何时使用相应压缩中间件 在IIS,Apache,Nginx中使用基于服务端的响应压缩技术.中间 ...

  10. 网页开发利用jq自定义鼠标右击事件

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...