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

ERROR when use vue create #889

Closed
vvpvvp opened this issue Feb 27, 2018 · 67 comments
Closed

ERROR when use vue create #889

vvpvvp opened this issue Feb 27, 2018 · 67 comments

Comments

@vvpvvp
Copy link

vvpvvp commented Feb 27, 2018

Version

3.0.0-alpha.13

Reproduction link

http://www.heyui.top/

Steps to reproduce

npm create test1
Please pick a preset: default (babel, eslint)

What is expected?

create successfull

What is actually happening?

ERROR command failed: npm install --loglevel error --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist


I choosed taobao registry, I can't change anymore.

@yyx990803
Copy link
Member

You can change it by editing ~/.vuerc.

Is that log all you get? Nothing else?

@vvpvvp
Copy link
Author

vvpvvp commented Feb 27, 2018

I changed back to vue-cli, it's ok to init project.
And I reinstall @vue-cli, use vue create my-project command.
image
image
But it was still no go.

@vvpvvp
Copy link
Author

vvpvvp commented Feb 27, 2018

I installed internal package global, but that does not work.

@yyx990803
Copy link
Member

Should be an npm + windows issue: npm/npm#19032

@vvpvvp
Copy link
Author

vvpvvp commented Mar 1, 2018

But I use mac, os x v10.11.6.

@zhengpq
Copy link

zhengpq commented May 27, 2018

@vvpvvp
I have the same problem today, how did you solve it ?

@dnhyde
Copy link

dnhyde commented May 27, 2018

Can you update vue-cli?
I have no issues with vue create my-project in version vue-cli-3.0.0-beta.11 + OSX 10.13.4.

You can check your version with vue -V and update vue-cli with
npm install -g @vue/cli or yarn global add @vue/cli

@zhengpq
Copy link

zhengpq commented May 27, 2018

i am using the latest version of vue-cli , the version is 3.0.0-beta.11, it is the same with yours, i had tried to update vue-cli but did not work
@dnhyde

@dnhyde
Copy link

dnhyde commented May 27, 2018

Ok, based on the error you posted on stackoverflow, it seems related to a plugin you are installing. I guess you already found this thread since you tried npm cache clean --force... I do not know how I can help, but could it be related to you npm version? I just noticed that I updated today to npm 6.1.0

@zhengpq
Copy link

zhengpq commented May 27, 2018

i have updated my npm too, i also updated it to 6.1.0, but did not work , maybe i should try to reinstall the node.js, vue-cli and the npm , thank you for your help!

@zhengpq
Copy link

zhengpq commented May 27, 2018

@dnhyde

i have updated my npm too, i also updated it to 6.1.0, but did not work , maybe i should try to reinstall the node.js, vue-cli and the npm , thank you for your help!

@kyleslight
Copy link

@zhengpq

According to this issue, cleaning npm cache hopefully helps the problem

@MartinYounghoonKim
Copy link

@vvpvvp
Did you solved this problem?

@vvpvvp
Copy link
Author

vvpvvp commented May 29, 2018

@MartinYounghoonKim
Sadly, the problem still exists.

@PhilMDev
Copy link

PhilMDev commented Jun 8, 2018

I also couldn't fix the problem with anything suggested. I am running Win 10. So, I tried using Yarn an alternative to NPM. It's been suggested that it's much faster and, at least visually on my system, it is.

To make this work I did the following:

npm remove -g @vue/cli (I was working with the vue cli 3 version - vue cli 2 still worked with npm)

Then I installed Yarn (https://yarnpkg.com/lang/en/docs/install/#windows-stable). I used the .MSI option. Had no problems.

Note: I had changed the default registry (was another suggestion on a different site) so make sure you reset it to:
npm config set registry "http://registry.npmjs.org"
Yes, you need to use NPM to reset it (AFAIK).

Then use the Yarn commands to install the vue cli:
yarn global add @vue/cli

I was then able to create a new project and added the Quasar cli also without a problem (at least so far). There is apparently a problem with the taobao mirror when using NPM. Everything I've seen has people pointing fingers at the other. Who knows. Yarn works.

@qaoo8
Copy link

qaoo8 commented Jun 14, 2018

I am using "vue-cli 3.0.0-rc.1", I solve the problems by setting the ~/.vuerc from "useTaobaoRegistry": true, to false.

@MartinYounghoonKim
Copy link

@qaoo8
Thanks for you help. I`ll try.

@2moemo
Copy link

2moemo commented Jun 20, 2018

@vvpvvp
I solved it by all removing vue modules and re-installing vue modules.

My commands:
$ sudo npm uninstall -g vue
$ sudo npm uninstall -g vue-cli
$ sudo npm uninstall -g @vue/cli
$ sudo npm cache clean --force
$ sudo npm install -g vue
$ sudo npm install -g @vue/cli

@chinf-tw
Copy link

@qaoo8
That solved my problem!!!

@phitlingt
Copy link

@yyx990803 @qaoo8 thanks, that solved my problem

@timcsy
Copy link

timcsy commented Jun 25, 2018

@qaoo8 That really solved my problem, too!

@BarrySong97
Copy link

@qaoo8 thanks, it solved.

@prophetw
Copy link

node/10.6.0 got this error
change it to node/8.11.2 solved my problem
somebody could have a try

@nuritlh
Copy link

nuritlh commented Jul 19, 2018

@2moemo thank you!!! problem solved :)

@chufengge
Copy link

@qaoo8 thanks you, problem solved

@franmako
Copy link

franmako commented Aug 5, 2018

@2moemo That fixed it for me too ! Thanks

@ding-xu
Copy link

ding-xu commented Aug 7, 2018

@2moemo thank you!!! problem solved

@NickBang
Copy link

@2moemo thank you. simple and rude. hh

@kid1412621
Copy link

using yarn meets same issue

@mint-wzt
Copy link

maybe you need to install python..

@mbvb1223
Copy link

mbvb1223 commented May 13, 2019

sudo gedit ~/.vuerc
Then edit it as below

{
  "useTaobaoRegistry": false
}

Its worked for me

@hu-qi
Copy link

hu-qi commented May 24, 2019

I am using "vue-cli 3.0.0-rc.1", I solve the problems by setting the ~/.vuerc from "useTaobaoRegistry": true, to false.

That‘s great!

@SamiMohsin
Copy link

just delete .vuerc file

rm ~/.vuerc

@ilgala
Copy link

ilgala commented Jun 18, 2019

sudo gedit ~/.vuerc
Then edit it as below

{
  "useTaobaoRegistry": false
}

Its worked for me

This also worked for me on Ubuntu 18.04 (fresh install). I've first removed the .vuerc file.

The output was that my connection to the default repository was slower... But it seems the exact opposite

@deepsea-tyy
Copy link

删除已有文件 ~/.vuerc 然后 vue create 重置

@Michel-Yang
Copy link

@shenhai1120
Thanks,I solve this problem

@ghost
Copy link

ghost commented Sep 22, 2019

npm cache clean --force

//it works for windows

@SantasDev
Copy link

@vvpvvp
I solved it by all removing vue modules and re-installing vue modules.

My commands:
$ sudo npm uninstall -g vue
$ sudo npm uninstall -g vue-cli
$ sudo npm uninstall -g @vue/cli
$ sudo npm cache clean --force
$ sudo npm install -g vue
$ sudo npm install -g @vue/cli

Thanks, I solve my problem just uninstall vue-cli

@ghost
Copy link

ghost commented Sep 28, 2019 via email

@SahanSiriwardhana
Copy link

@2moemo Thank You ....

@mustafaabduljalil
Copy link

@2moemo
Thanks, ur solution solve my problem :)

@IrfanGhouri
Copy link

@2moemo
Finally solved, Thanks.

@chipmunktail
Copy link

@qaoo8 it works, thank you

@volantes
Copy link

volantes commented Apr 1, 2020

What worked for me:

Not trying to vue create projectname in a Google Drive "G:" drive directory.

Solution: runing vue create projectname in a C:\ drive directory.

I'm running Windows 10.

I hope this helps someone.

@untillnesss
Copy link

I am using "vue-cli 3.0.0-rc.1", I solve the problems by setting the ~/.vuerc from "useTaobaoRegistry": true, to false.

Nice, Thank. This work for me

@Lizhenjie1009
Copy link

It can aslo be solved.

npm cache clean -f
Then install it manually through @vue/cli,Do not create projects by default.

@chemirikmohamed
Copy link

Thanks, That solved my problem!!!

@PriyanSiva
Copy link

sudo gedit ~/.vuerc
Then edit it as below

{
  "useTaobaoRegistry": false
}

Its worked for me

Thanks man.

@DhFernando
Copy link

npm install -g @vue/cl

Just run it, This work for me

@Messias-Gomes
Copy link

@vvpvvp
Eu resolvi isso removendo todos os módulos vue e reinstalando os módulos vue.

Meus comandos:
$ sudo npm uninstall -g vue
$ sudo npm uninstall -g vue-cli
$ sudo npm uninstall -g @vue/cli
$ sudo npm cache clean --force
$ sudo npm install -g vue
$ sudo npm install -g @vue/cli

obg. isso resolveu meu porblema!

@Messias-Gomes
Copy link

obg. vinha tendo esse problema, esses comandos resolveram!

@dhanyn10
Copy link

dhanyn10 commented Jun 4, 2021

sudo gedit ~/.vuerc
Then edit it as below

{
  "useTaobaoRegistry": false
}

Its worked for me

@PriyanSiva thanks.

i'm using win 10, with cmder apps. any people with the same os like me can use:

nano ~/.vuerc

@lavanyascyberlife
Copy link

I had same issue when i was installing vue-cli with npx .... tried all the solutions from google.. nothing worked for me ..

so then i moved to install vue-cli with yarn package manager thats when i figured out the issue .. my issue was basically my node version which was 8.x.x but yarn was expecting 10.x.x with nvm i have installed latest node which is 16.x.x then tried installing vue-cli with yarn ..

it worked like charm!!!!

@Sina-Naeimi
Copy link

@vvpvvp I solved it by all removing vue modules and re-installing vue modules.

My commands: $ sudo npm uninstall -g vue $ sudo npm uninstall -g vue-cli $ sudo npm uninstall -g @vue/cli $ sudo npm cache clean --force $ sudo npm install -g vue $ sudo npm install -g @vue/cli

that works for me thank you

@norhan22
Copy link

I am using "vue-cli 3.0.0-rc.1", I solve the problems by setting the ~/.vuerc from "useTaobaoRegistry": true, to false.

@vvpvvp I solved it by all removing vue modules and re-installing vue modules.

My commands: $ sudo npm uninstall -g vue $ sudo npm uninstall -g vue-cli $ sudo npm uninstall -g @vue/cli $ sudo npm cache clean --force $ sudo npm install -g vue $ sudo npm install -g @vue/cli

Both didn't work for me
node v 14.19.0
win 11

but I removed ~/.vuerc file, and now it works.

@mint-wzt
Copy link

mint-wzt commented Apr 25, 2022 via email

@hamidchoopani
Copy link

Try with this code

npm update npm -g

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