【问题标题】:Vue : Unexpected end of JSON input while parsing near '...version":"0.5.0","dev'Vue:在“...版本”附近解析时 JSON 输入意外结束:“0.5.0”,“开发”
【发布时间】:2020-05-13 12:19:18
【问题描述】:

我正在学习 Vue JS。计划在上面开发应用程序。最初我通过

安装了 Vue
npm install vue-cli -g

但是一些好朋友告诉我,这是折旧的。它也在文档中。 Vue Javascript with npm install command

https://cli.vuejs.org/guide/installation.html

但是无法通过cmd安装Vue:

npm install -g @vue/cli

这给了我错误:

npm ERR! Unexpected end of JSON input while parsing near '...version":"0.5.0","dev'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Abhilash\AppData\Roaming\npm-cache\_logs\2020-05-13T12_14_23_300Z-debug.log

可能是什么错误?如何克服这一点?

【问题讨论】:

    标签: vue.js npm


    【解决方案1】:

    尝试清理npm缓存然后安装vue

    npm cache clean --force
    npm install -g  @vue/cli
    

    【讨论】:

    • 乐于助人:)
    猜你喜欢
    • 2021-01-04
    • 2019-12-11
    • 2019-08-04
    • 2019-04-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-07
    • 2020-09-18
    • 2019-10-16
    相关资源
    最近更新 更多