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-cli hangs while creating new project #1385

Closed
NekoGuy opened this issue May 29, 2018 · 21 comments
Closed

vue-cli hangs while creating new project #1385

NekoGuy opened this issue May 29, 2018 · 21 comments

Comments

@NekoGuy
Copy link

NekoGuy commented May 29, 2018

Version

3.0.0-beta.11

Reproduction link

Steps to reproduce

Use commands in console:

npm install -g @vue/cli

Then:

vue create application

What is expected?

The project "application" was created

What is actually happening?

After choosing parameters this text was showing in console for endless time :

Vue CLI v3.0.0-beta.12

  • Creating project in D:\projects.

And file "package.json" was created in folder "application" with content:

{
"name": "application",
"version": "0.1.0",
"private": true,
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.0-beta.12",
"@vue/cli-plugin-typescript": "^3.0.0-beta.12",
"@vue/cli-plugin-pwa": "^3.0.0-beta.12",
"@vue/cli-plugin-unit-mocha": "^3.0.0-beta.12",
"@vue/cli-plugin-e2e-cypress": "^3.0.0-beta.12",
"@vue/cli-service": "^3.0.0-beta.12"
}
}


npm version

{ npm: '6.1.0',
ares: '1.14.0',
cldr: '33.0',
http_parser: '2.8.0',
icu: '61.1',
modules: '64',
napi: '3',
nghttp2: '1.29.0',
node: '10.2.1',
openssl: '1.1.0h',
tz: '2018c',
unicode: '10.0',
uv: '1.20.3',
v8: '6.6.346.32-node.8',
zlib: '1.2.11' }

vue --version

3.0.0-beta.12

Parameters which I chose:

default (babel, eslint) -> hangs on creating
Manually select features -> hangs on creating

I also tried to use "vue init webpack application" via @vue/cli-init and installed @vue/cli-service-global and it also hangs

All previous versions I removed

OS: Windows 10 x64

@NekoGuy
Copy link
Author

NekoGuy commented May 29, 2018

All strings with "@" disappeared...

npm install -g

Should be: npm install -g @vue/cli

{
"name": "application",
"version": "0.1.0",
"private": true,
"devDependencies": {
"": "^3.0.0-beta.12",
"": "^3.0.0-beta.12",
"": "^3.0.0-beta.12",
"": "^3.0.0-beta.12",
"": "^3.0.0-beta.12",
"": "^3.0.0-beta.12"
}
}

Should be:

{ "name": "application", "version": "0.1.0", "private": true, "devDependencies": { "@vue/cli-plugin-babel": "^3.0.0-beta.12", "@vue/cli-plugin-typescript": "^3.0.0-beta.12", "@vue/cli-plugin-pwa": "^3.0.0-beta.12", "@vue/cli-plugin-unit-mocha": "^3.0.0-beta.12", "@vue/cli-plugin-e2e-cypress": "^3.0.0-beta.12", "@vue/cli-service": "^3.0.0-beta.12" } }

I also tried to use "vue init webpack application" via and installed and it also hangs

Should be:

I also tried to use "vue init webpack application" via @vue/cli-init and installed @vue/cli-service-global and it also hangs

@yyx990803
Copy link
Member

Are you behind a corporate proxy or anything like that?

@bblumberg

This comment has been minimized.

@NekoGuy
Copy link
Author

NekoGuy commented May 29, 2018

@yyx990803, I am not behind a corporate proxy. I've also tried to create a project via another internet provider
If You meant that vue-cli can't reach the download server I can try to ping it by myself

@NekoGuy

This comment has been minimized.

@Akryum

This comment has been minimized.

@zmgalante

This comment has been minimized.

@nbnotabene

This comment has been minimized.

@NekoGuy
Copy link
Author

NekoGuy commented May 30, 2018

In addition:

After executing "npm install -g @vue/cli" these messages appear:

image

So I've executed "npm install --save graphql@0.11.7" in "@vue/cli" folder:

image

but more warnings appeared

And creating project proccess still hangs

image

P.S.: spinner before "Creating" is not rolling

@funnymania
Copy link

funnymania commented Jun 1, 2018

I too am having this problem using Vue CLI v3.0.0-beta.15. Identical warnings to what NekoGuy is experiencing. Same OS.

If it helps, I have tried this using beta.10 and beta.15, which both hang.
Vue-cli is not functioning for 2.9.5 as well.

@funnymania
Copy link

funnymania commented Jun 1, 2018

I fixed this using solution here: #1105 (comment) , except using beta.15.

Essentially, downgrading node to 8.11.2 worked for me.

@PeppeL-G
Copy link

PeppeL-G commented Jun 1, 2018

I'm using Windows 10, and when I ran:

npm i -g @vue/cli
vue create my-project

Nothing happened (no folder created, no error message). Then I ran:

npm i -g @vue/cli@v3.0.0-beta.15
vue create my-project

And it worked (the folder my-project was created, and npm run serve worked as expected).

@yyx990803
Copy link
Member

Should be fixed in beta.15 now.

@piboistudios
Copy link

Just wanted to note that for anyone still experiencing this problem, it is likely because you have Node.js v 10.3.0

@Olena-Stotska
Copy link

I found that it also hangs if ~/.vuerc file contains this:

{
   "useTaobaoRegistry": true
}

you need to change this to :

{
   "useTaobaoRegistry": false
}

or just remote .vuerc file

@bigsee
Copy link

bigsee commented Oct 1, 2018

I had the same issue as @piboistudios and had to use nvm to download (and use) Node 8.12. Docs could probably make this clearer (unless I'm being totally blind).

@NathanWailes
Copy link

NathanWailes commented Nov 17, 2018

I had this issue after upgrading node and npm to the latest versions (I'm on Windows 10, I upgraded to Node v10.13.0 and npm 6.4.1). Re-installing vue-cli fixed it for me: npm install -g @vue/cli.

@montoyaedu
Copy link

We, @montoyaedu and @BeaChoq

are experiencing the same problem with the latest version of node. In both, Mac OSX and Windows environments.

node --version
v12.4.0
npm --version
6.9.0

For some reason, it hangs at the second call of the function ask at:

/usr/local/lib/node_modules/\@vue/cli-init/node_modules/vue-cli/lib/generate.js
/**
 * Create a middleware for asking questions.
 *
 * @param {Object} prompts
 * @return {Function}
 */

function askQuestions (prompts) {
  return (files, metalsmith, done) => {
    ask(prompts, metalsmith.metadata(), done)
  }
}

The method "ask" can be found at:

/usr/local/lib/node_modules/\@vue/cli-init/node_modules/vue-cli/lib/ask.js

We didn't have yet time to investigate, but as a workaround, we return and call the callback method "done" ate the very beginning.

function prompt (data, key, prompt, done) {
 35     return done() 
 36   // skip prompts whose when condition is not met
 37   if (prompt.when && !evaluate(prompt.when, data)) {
 38     return done()
 39   }

@burzum
Copy link

burzum commented Sep 23, 2019

Same issue here, Windows 10.

λ npm -v       
6.10.3         
λ node -v
v12.8.0

@ethan-deng
Copy link

I also see this issue with vue cli 4.0.5. I didn't see the issue with 4.0.1

@TraceyCanter
Copy link

Same issue here. Finally got it working with vue ui.

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