Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

初始化vue-cli3报错 #46

Closed
zhangaofei opened this issue Apr 2, 2019 · 5 comments
Closed

初始化vue-cli3报错 #46

zhangaofei opened this issue Apr 2, 2019 · 5 comments

Comments

@zhangaofei
Copy link

你好!
我用vue-cli3初始化报错,错误内容如下:
Vue CLI v3.5.5
✨ Creating project in D:\zafProject\work-project\ts-demo\hello.
� Initializing git repository...
⚙ Installing CLI plugins. This might take a while...

'yarn'
ERROR command failed: yarn --registry=https://registry.npm.taobao.org --distur
l=https://npm.taobao.org/dist
错误图片链接:
https://user-gold-cdn.xitu.io/2019/4/2/169dc07f8b4cb17c?w=656&h=210&f=png&s=11301
请问怎样解决;

@Armour
Copy link
Owner

Armour commented Apr 2, 2019

这个和本项目无关 暂时close 貌似是你的yarn有问题 不太清楚是不是国内有墙所以用不了 你可以去vue-cli下面看看有没有类似问题

@Armour Armour closed this as completed Apr 2, 2019
@zhangaofei
Copy link
Author

我用的npm 没有用yarn,却报错yarn的错误搞不懂

@Armour
Copy link
Owner

Armour commented Apr 2, 2019

能否详细解释你做的事情

@zhangaofei
Copy link
Author

目的:想做一个ts是demo,熟悉一下vue中ts的相关配置和用法;
看到官网推荐使用:

1. 如果没有安装 Vue CLI 就先安装

npm install --global @vue/cli

2. 创建一个新工程,并选择 "Manually select features (手动选择特性)" 选项

vue create my-project-xx
然后选择自己的配置,选完后回车,出现错误:
'yarn'
ERROR command failed: yarn --registry=https://registry.npm.taobao.org --distur
l=https://npm.taobao.org/dist
错误图片链接:
https://user-gold-cdn.xitu.io/2019/4/2/169dc07f8b4cb17c?w=656&h=210&f=png&s=11301
但是全程没用yarn,不知道为啥报上面与yarn的错

@Armour
Copy link
Owner

Armour commented Apr 2, 2019

如果完全没有用到本项目的话 就不是这项目的问题了 听起来可能是vue cli的问题 猜测vue cli内部运行install强行prefer用yarn了 至于为啥这样的话我暂时也没啥思路 你可以去vue-cli上问问

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants