npx create-nuxt-app [项目名称] 报错

安装 create-nuxt-app@latest 失败,错误代码:1

ISSACLU-MB0:meituan luruibing$ vim /Users/luruibing/.npm/_logs/2019-10-30T16_19_20_929Z-debug.log

ISSACLU-MB0:meituan luruibing$ npm i create-nuxt-app

npm ERR! Unexpected end of JSON input while parsing near '...5cd3a038bbee7bba865bd'

npm ERR! A complete log of this run can be found in:

npm ERR!    /Users/xxxxx/.npm/_logs/2019-10-31T02_42_34_658Z-debug.log

ISSACLU-MB0:meituan luruibing$ npm i -g create-nuxt-app

npm ERR! Unexpected end of JSON input while parsing near '...write-file-atomic/-/w'

npm ERR! A complete log of this run can be found in:

npm ERR!    /Users/luruibing/.npm/_logs/2019-10-31T02_44_11_483Z-debug.log

错误代码如上

解答链接:https://github.com/vuejs-templates/webpack/issues/990

npm cache clean --force清理了安装包缓存后再重新安装create-nuxt-app模块就正常了

你可能感兴趣的:(npx create-nuxt-app [项目名称] 报错)