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 init webpack',SyntaxError: Unexpected end of JSON input #545

Closed
sandmanman opened this issue Aug 1, 2017 · 6 comments
Closed

'vue init webpack',SyntaxError: Unexpected end of JSON input #545

sandmanman opened this issue Aug 1, 2017 · 6 comments

Comments

@sandmanman
Copy link

node

node -v
v8.2.1

npm

npm -v
5.3.0

log

vue-init webpack

? Generate project in current directory? Yes

undefined:1
{"_id":"vue-cli","_rev":"73-765c2c042d41b6f806932a869635c769","name":"vue-cli","description":"A simple CLI for scaffolding Vue.js projects.","dist-tags":{"latest":"2.8.2"},"versions":{"1.0.0":{"name":"vue-cli","version":"1.0.0","description":"Opinionated CLI for starting Vue.js single page applications","preferGlobal":true,"bin":{"vue":"bin/vue"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/vuejs/vue-cli.git"},"keywords":["vue","cli","spa"],"author":{"name":"Evan You"},"license":"MIT","bugs":{"url":"https://github.com/vuejs/vue-cli/issues"},"homepage":"https://github.com/vuejs/vue-cli#readme","main":"lib/index.js","dependencies":{"chalk":"^1.1.1","commander":"^2.9.0","download-github-repo":"^0.1.3","khaos":"^0.9.3","read-metadata":"^1.0.0","request":"^2.67.0","rimraf":"^2.5.0","uid":"0.0.2"},"gitHead":"c3daf7b2f7d3e27bf5a6b31c5ff28a6f05df47b1","_id":"[email protected]","_shasum":"97c5d6e66ced1931d05c13fb459c5331c25b9a85","_from":".","_npmVersion":"3.3.12","_nod

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Request._callback (/Users/sandman/.nvm/versions/node/v8.2.1/lib/node_modules/vue-cli/lib/check-version.js:19:32)
    at Request.self.callback (/Users/sandman/.nvm/versions/node/v8.2.1/lib/node_modules/vue-cli/node_modules/request/request.js:188:22)
    at emitTwo (events.js:125:13)
    at Request.emit (events.js:213:7)
    at Request.<anonymous> (/Users/sandman/.nvm/versions/node/v8.2.1/lib/node_modules/vue-cli/node_modules/request/request.js:1171:10)
    at emitOne (events.js:115:13)
    at Request.emit (events.js:210:7)
    at IncomingMessage.<anonymous> (/Users/sandman/.nvm/versions/node/v8.2.1/lib/node_modules/vue-cli/node_modules/request/request.js:1091:12)
    at Object.onceWrapper (events.js:314:30)
    at emitNone (events.js:110:20)
    at IncomingMessage.emit (events.js:207:7)
    at endReadableNT (_stream_readable.js:1045:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
@posva
Copy link
Member

posva commented Aug 1, 2017

Cannot reproduce with the same versions.
Can you provide more information like OS?

@sandmanman
Copy link
Author

@posva
macOS 10.11.6 (OS X EI Capitan)

Terminal: iTerm2,oh-my-zsh

@afontcu
Copy link
Member

afontcu commented Aug 1, 2017

Using almost the same (OS X 10.11.4, but...) and vue init webpack whatever or even vue init webpack is working fine.

Where are you trying to set up your project? Do you have permission to write on the folder?

@sandmanman
Copy link
Author

sandmanman commented Aug 1, 2017

@afontcu
Like this:

halo-vue-web git:(master) ✗ vue-init webpack

? Generate project in current directory? Yes

undefined:1
..............

I use the nvm to switch the version of the node.

I am sure, I have permission.

Sorry my English is poor.

@afontcu
Copy link
Member

afontcu commented Aug 1, 2017

Have you tried setting a destination path? Such as vue init webpack test

@sandmanman
Copy link
Author

😅 😅 😅 😅 😅 😅 😅 😅 😅
I really don't know what happened, the computer had a good night's rest always the normal work, may be a problem with my computer.
Thank you very much for your answer!!

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