安装 hexo npm 报错 是什么原因?求助 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
getElementsbyId
V2EX    Node.js

安装 hexo npm 报错 是什么原因?求助

  •  
  •   getElementsbyId 2018-12-27 16:45:18 +08:00 5418 次点击
    这是一个创建于 2489 天前的主题,其中的信息可能已经有所发展或是发生改变。

    $ npm install -g hexo
    npm WARN deprecated [email protected]: no longer maintained
    npm WARN deprecated [email protected]: postinstall-build's behavior is now built into npm! You should migrate off of postinstall-build and use the new prepare lifecycle script with npm 5.0.0 or greater.
    npm ERR! Unexpected end of JSON input while parsing near '...2.1","nyc":"^3.0.0","'
    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2018-12-27T08_34_53_110Z-debug.log

    6 条回复
    getElementsbyId
        1
    getElementsbyId  
    OP
       2018-12-27 16:46:19 +08:00
    百度了一下 有说是 npm 源的问题 已经更换为 taobao 源 但是还是报这个错
    Twinkle
        2
    Twinkle  
       2018-12-27 16:50:08 +08:00   1
    npm i -g hexo-cli

    用新版,你装的是老的
    jera
        3
    jera  
       2018-12-27 16:53:02 +08:00
    看报错应该是 package.json 语法错误
    Dictator
        4
    Dictator  
       2018-12-27 16:58:08 +08:00
    package.json 有问题吧
    getElementsbyId
        5
    getElementsbyId  
    OP
       2018-12-27 16:58:36 +08:00
    @Twinkle 确实是的 已经解决 谢谢 Thanks(ω)
    getElementsbyId
        6
    getElementsbyId  
    OP
       2018-12-27 17:08:21 +08:00
    @Twinkle 然后我 init 的时候 他把项目 clone 到我本地了 但还是继续报错 还是 npm WARN 不推荐使用 [email protected]:不再维护<br>
    npm WARN 不推荐使用 [email protected]
    npm WARN deprecated [email protected]: no longer maintained<br>
    npm WARN deprecated [email protected]: postinstall-build's behavior is now built into npm! You should migrate off of postinstall-build and use the new `prepare` lifecycle script with npm 5.0.0 or greater.
    npm ERR! Unexpected end of JSON input while parsing near '...2.1","nyc":"^3.0.0","'<br>

    npm ERR! A complete log of this run can be found in:<br>
    npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-12-27T09_03_53_885Z-debug.log<br>
    WARN Failed to install dependencies. Please run 'npm install' manually!<br>
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5362 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 29ms UTC 07:38 PVG 15:38 LAX 00:38 JFK 03:38
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86