npm install @wepy/cli -g 出错:npm ERR! Unexpected end of JSON input while parsing near '...1.0.0"}
原创 lido_me 发表于:2020-02-22 10:37:36
  阅读 :515   收藏   编辑
C:\Users\admin>npm install @wepy/cli -g
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellane
ous Warning ECONNRESET: request to https://registry.npmjs.org/@wepy%2fcli failed
, reason: read ECONNRESET
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a req
uest error during revalidation.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://git
hub.com/request/request/issues/3142
npm ERR! Unexpected end of JSON input while parsing near '...1.0.0"},"devDepende
nc'

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\install\nodejs\node_cache\_logs\2020-02-21T11_35_59_278Z-debug.l
og

解决

  • 更换镜像

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

npm cache clean --force