vue-cli hangs while creating new project

Created on 29 May 2018  路  21Comments  路  Source: vuejs/vue-cli

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

Most helpful comment

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

All 21 comments

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

Are you behind a corporate proxy or anything like that?

I am getting the following when I do a vue create with the latest beta:

馃殌 Invoking generators...
ERROR Error: Failed to resolve plugin: @vue/cli-service
Error: Failed to resolve plugin: @vue/cli-service
at Creator.resolvePlugins (/Users/bruce/.nvm/versions/node/v8.9.4/lib/node_modules/@vue/cli/lib/Creator.js:303:15)
at Creator.create (/Users/bruce/.nvm/versions/node/v8.9.4/lib/node_modules/@vue/cli/lib/Creator.js:146:32)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

@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

@yyx990803, I've also tried to execute command:

vue ui

and got:

馃殌 Starting GUI...
ERROR TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type undefined
at Module.require (internal/modules/cjs/loader.js:644:11)
at require (internal/modules/cjs/helpers.js:20:18)
at load (D:UsersuserAppDataRoamingnpmnode_modules@vueclinode_modulesvue-cli-plugin-apollographql-serverindex.js:17:18)
at module.exports (D:UsersuserAppDataRoamingnpmnode_modules@vueclinode_modulesvue-cli-plugin-apollographql-serverindex.js:39:28)
at ui (D:[email protected]:41:3)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:746:11)
at startup (internal/bootstrap/node.js:238:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)

This is unrelated and already fixed in #1397

I am getting the same error:

vue-cli: 3.0.0-beta.14
node: 'v10.3.0'
npm: '6.1.0',
yarn: '1.7.0'
Windows 10

Vue create create works fine, it creates everything, although when I use vue ui it gives the same error.

C:UsersBoldfront-end-base>vue ui
馃殌 Starting GUI...
ERROR TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type undefined
at Module.require (internal/modules/cjs/loader.js:644:11)
at require (internal/modules/cjs/helpers.js:20:18)
at load (C:UsersBoldAppDataLocalYarnconfigglobalnode_modulesvue-cli-plugin-apollographql-serverindex.js:17:18)
at module.exports (C:UsersBoldAppDataLocalYarnconfigglobalnode_modulesvue-cli-plugin-apollographql-serverindex.js:39:28)
at ui (C:[email protected]:41:3)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:746:11)
at startup (internal/bootstrap/node.js:238:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)

Same problem here.

Work-around: bleeding node version
Same as https://github.com/vuejs/vue-cli/issues/1396

In addition:

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

image

So I've executed "npm install --save [email protected]" in "@vue/cli" folder:

image

but more warnings appeared

And creating project proccess still hangs

image

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

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.

I fixed this using solution here: https://github.com/vuejs/vue-cli/issues/1105#issuecomment-393143113 , except using beta.15.

Essentially, downgrading node to 8.11.2 worked for me.

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/[email protected]
vue create my-project

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

Should be fixed in beta.15 now.

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

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

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

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.

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   }

Same issue here, Windows 10.

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

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

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

Was this page helpful?
0 / 5 - 0 ratings