zhengpq
zhengpq

Reputation: 21

Error when use 'vue create my-project': Unexpected end of JSON input while parsing

the command:

vue create vue-hello

the Error:

npm ERR! Unexpected end of JSON input while parsing near '...kwrap":false,"publish'

npm ERR! A complete log of this run can be found in: npm ERR! /Users/hope111/.npm/_logs/2018-05-27T03_02_46_740Z-debug.log ERROR command failed: npm install --loglevel error --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist

Here is the picture of the error:

picture of the error

I had used the npm cache clean --force, but it did not work

Upvotes: 2

Views: 3162

Answers (3)

Maybe running these commands will solve it. It helped me with a similar problem when trying to create a new project with vue create

error: ~/.vuerc may be outdated. Please delete it and re-run vue-cli in manual mode.

solution:

$ npm uninstall -g vue

$ npm uninstall -g vue-cli

$ npm uninstall -g @vue/cli

$ npm cache clean --force

$ npm install -g vue

$ npm install -g @vue/cli

Upvotes: 0

Zoul Barizi
Zoul Barizi

Reputation: 530

  1. npm cache clean --force
  2. npm update
  3. npm install -g @vue/cli

Upvotes: 2

dnhyde
dnhyde

Reputation: 1305

According to this issue, it seems that updating to npm 6+ solves some vue-cli3.0.0-beta.11 bugs

Upvotes: 0

Related Questions