Skip to content

Simple project create fails #1523

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

Closed
csakis opened this issue Jun 8, 2018 · 3 comments
Closed

Simple project create fails #1523

csakis opened this issue Jun 8, 2018 · 3 comments

Comments

@csakis
Copy link

csakis commented Jun 8, 2018

Version

3.0.0-beta.15

Reproduction link

There' no reproduction link available.

Steps to reproduce

vue create my-app

What is expected?

A default vue project is created

What is actually happening?

Vue stops with en error:

🗃 Initializing git repository...
⚙ Installing CLI plugins. This might take a while...

npm ERR! Unexpected end of JSON input while parsing near '...hasum":"60d1df041aa70'

Detailed log:

2373 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...hasum":"60d1df041aa70'
2373 verbose stack at JSON.parse ()
2373 verbose stack at parseJson (C:\Users\csaki\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\node_modules\json-parse-better-errors\index.js:7:17)
2373 verbose stack at consumeBody.call.then.buffer (C:\Users\csaki\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\body.js:96:50)
2373 verbose stack at
2373 verbose stack at process._tickCallback (internal/process/next_tick.js:188:7)
2374 verbose cwd E:\csaba\Documents\git\vuetify-app
2375 verbose Windows_NT 10.0.17134
2376 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\csaki\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "--loglevel" "error" "--registry=https://registry.npm.taobao.org" "--disturl=https://npm.taobao.org/dist"
2377 verbose node v8.6.0
2378 verbose npm v5.6.0
2379 error Unexpected end of JSON input while parsing near '...hasum":"60d1df041aa70'
2380 verbose exit [ 1, true ]


Platform is Windows 10 Pro.
I tried using the UI, resulted with same error

@yyx990803
Copy link
Member

yyx990803 commented Jun 8, 2018

You selected the taobao npm registry which seems to be causing the issue... Try editing ~/.vuerc and disable "useTaobaoRegistry".

Alternatively, there's corrupted cache. Run npm cache clean --force and try again.

I'm closing this as it's not really something can be fixed by Vue CLI. But let us know if the above fixes the problem.

@csakis
Copy link
Author

csakis commented Jun 8, 2018

Thanks, Evan. I disabled the TaobaoRegistry in the .vuerc:

  "useTaobaoRegistry": false,
  "packageManager": "npm"
}

Now, project creation works. Perhaps the default vue-cli installation should come with this option disabled. I don't think I have ever modified the .vuerc file by hand.

@edunwa302
Copy link

You selected the taobao npm registry which seems to be causing the issue... Try editing ~/.vuerc and disable "useTaobaoRegistry".

Alternatively, there's corrupted cache. Run npm cache clean --force and try again.

I'm closing this as it's not really something can be fixed by Vue CLI. But let us know if the above fixes the problem.

wow! thanks the catche cleaning did the job for me as i was facing same issues for hours

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

3 participants