Skip to content

Instantly share code, notes, and snippets.

@wbchn
Created December 21, 2017 01:18
Show Gist options
  • Save wbchn/9e155550b18148fb22bedf77954a155a to your computer and use it in GitHub Desktop.
Save wbchn/9e155550b18148fb22bedf77954a155a to your computer and use it in GitHub Desktop.
解决npm出现`Unexpected end of`错误

ERRORS

I got error like below:

npm ERR! Unexpected end of input at 1:23369

or

npm ERR! Unexpected end of JSON ...

SOLVE

  1. using clean cache:

npm cache clean --force

  1. (optional) set npm register mirror to .npmrc:

registry = https://registry.npm.taobao.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment