【问题标题】:Error while installing vue CLI: npm ERR! Unexpected end of JSON input while parsing near '...ulp-rename":"0.0.33",'安装 vue CLI 时出错:npm ERR!在'...ulp-rename":"0.0.33",'附近解析时 JSON 输入意外结束
【发布时间】:2020-05-18 10:08:18
【问题描述】:

我有一个旧版本的 vue CLI,我想升级到 CLI 3,所以首先我要做的是卸载以前的版本:

npm uninstall vue-cli -g

然后尝试安装:

npm install -g @vue/cli

我收到以下错误:

npm ERR! Unexpected end of JSON input while parsing near '...ulp-rename":"0.0.33",'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\31089\AppData\Roaming\npm-cache\_logs\2020-02-02T11_48_31_187Z-debug.log

完整的日志信息可见here
我的node 版本:v12.14.0
我的npm 版本:6.13.4
我试过了

npm cache clean --force  

但是没有用。

【问题讨论】:

    标签: npm vue-cli


    【解决方案1】:

    我想通了,如果你以管理员身份运行命令提示符窗口,那么先做

    npm cache clean --force  
    

    然后可以安装成功

    【讨论】:

    • npm WARN using --force 我当然希望你知道你在做什么。
    猜你喜欢
    • 2020-09-18
    • 1970-01-01
    • 2020-05-24
    • 2021-01-04
    • 2019-08-05
    • 2020-11-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多