npm install @wepy/cli -g 出错

npm install @wepy/cli -g 出错:npm ERR! Unexpected end of JSON input while parsing near '...1.0.0"}
  1. C:Usersadmin>npm install @wepy/cli -g
  2. npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellane
  3. ous Warning ECONNRESET: request to https://registry.npmjs.org/@wepy%2fcli failed
  4. , reason: read ECONNRESET
  5. npm WARN registry Using stale data from https://registry.npmjs.org/ due to a req
  6. uest error during revalidation.
  7. npm WARN deprecated request@2.88.2: request has been deprecated, see https://git
  8. hub.com/request/request/issues/3142
  9. npm ERR! Unexpected end of JSON input while parsing near '...1.0.0"},"devDepende
  10. nc'
  11.  
  12. npm ERR! A complete log of this run can be found in:
  13. npm ERR!     D:install odejs ode_cache\_logs2020-02-21T11_35_59_278Z-debug.l
  14. og

解决

  • 更换镜像

  1. npm set registry https://registry.npmjs.org/
  • 清除缓存

  1. npm cache clean --force

 原链接https://faceghost.com/article/469121

踩过这个坑,还有下一个坑等着你,这一路就是给自己填坑,坑填多了,也就习惯了,直到这一路平坦了,也就无怨无悔了。
原文地址:https://www.cnblogs.com/xiaofeilin/p/13386093.html