zoukankan      html  css  js  c++  java
  • vue安装脚手架 Unexpected end of JSON input while parsing near '...sTbtjnjIcgi U7iVktNJE'

    没办法安装上,一直报错

    今天尝试一些安装vue脚手架做项目,然后一直报错
    Unexpected end of JSON input while parsing near '...61SUX9hxFtXXQwLEROcL'
    Unexpected end of JSON input while parsing near '...al-exit":"^3.0.0","st'

    npm ERR! Unexpected end of JSON input while parsing near '...0"},"_hasShrinkwrap":'
    npm ERR! A complete log of this run can be found in:
    npm ERR! /home/jane/.npm/_logs/2018-06-09T06_14_46_082Z-debug.log

    解决办法

    npm代理为淘宝的代理的时候就会发生这样的错误,将npm代理换回来就不报错了,具体原因不详,但是亲证可行(修改代理)
    npm config set registry http://registry.cnpmjs.org

    第二种办法
    npm config set registry“ http://registry.npmjs.org

    试过的办法

    1-清除缓存(不行)
    npm cache clean --force
    2-重新安装(不行)
    npm uninstall -g vue
    npm uninstall -g vue-cli
    npm uninstall -g @vue/cli
    npm cache clean --force
    npm install -g vue
    npm install -g @vue/cli

    3-更新npm版本(不行)
    npm install npm@latest -g(更新到最新版本)


    链接:https://www.jianshu.com/p/e7828f5ae99a
    来源:简书
    著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
    愿世间所有的美好都会降临到每个人的身边
  • 相关阅读:
    注释
    Java三种嵌入jsp的方法
    JSP page指令
    Web应用的目录结构
    Tomcat安装和配置
    动态网页和静态网页的区别
    B/S架构与C/S架构的区别
    URL
    常用SQL查询语句
    SQL--Delete语句
  • 原文地址:https://www.cnblogs.com/boystao/p/13261203.html
Copyright © 2011-2022 走看看