npm 报错Unexpected end of JSON input while parsing near……

npm WARN notice Due to a recent security incident, all user tokens have been invalidated. Please see https://status.npmjs.org/incidents/dn7c1fgrr7ng for more details. To generate a new token, visit https://www.npmjs.com/settings/~/tokens or run "npm login".

  或者

Unexpected end of JSON input while parsing near '...ps://registry.npmjs.o'

  解决方法:

npm set registry https://registry.npmjs.org/

你可能感兴趣的:(npm 报错Unexpected end of JSON input while parsing near……)