V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
yx30
V2EX  ›  问与答

请教 hexo 搭载的问题,出现错误了,一直无法搭建成功,折腾了半天,能不能帮我看看

  •  
  •   yx30 · 2014-03-05 21:28:07 +08:00 · 7325 次点击
    这是一个创建于 3703 天前的主题,其中的信息可能已经有所发展或是发生改变。
    C:\Documents and Settings\Administrator>hexo deploy --generate
    [info] Files loaded in 0.250s
    [error] HexoError: Render failed: 2014/03/04/yexiang/index.html
    ReferenceError: C:\Documents and Settings\Administrator\themes\pacman\layout\lay
    out.ejs:6
    4| <div class="wrapper">
    5| <header id="header"><%- partial('_partial/header') %></header>
    >> 6| <div class="content"><%- body %></div>
    7| </div>
    8| <div class="widget-wrapper">
    9| <%- partial('_partial/sidebar') %>

    body is not defined
    at eval (eval at <anonymous> (C:\Documents and Settings\Administrator\Applic
    ation Data\npm\node_modules\hexo\node_modules\ejs\lib\ejs.js:237:14), <anonymous
    >:29:238)
    at eval (eval at <anonymous> (C:\Documents and Settings\Administrator\Applic
    ation Data\npm\node_modules\hexo\node_modules\ejs\lib\ejs.js:237:14), <anonymous
    >:29:543)
    at C:\Documents and Settings\Administrator\Application Data\npm\node_modules
    \hexo\node_modules\ejs\lib\ejs.js:250:15
    at Object.exports.render (C:\Documents and Settings\Administrator\Applicatio
    n Data\npm\node_modules\hexo\node_modules\ejs\lib\ejs.js:288:13)
    at module.exports (C:\Documents and Settings\Administrator\Application Data\
    npm\node_modules\hexo\lib\plugins\renderer\ejs.js:5:14)
    at store.(anonymous function) (C:\Documents and Settings\Administrator\Appli
    cation Data\npm\node_modules\hexo\lib\extend\renderer.js:67:27)
    at C:\Documents and Settings\Administrator\Application Data\npm\node_modules
    \hexo\lib\core\render.js:181:7
    at fn (C:\Documents and Settings\Administrator\Application Data\npm\node_mod
    ules\hexo\node_modules\async\lib\async.js:579:34)
    at Object._onImmediate (C:\Documents and Settings\Administrator\Application
    Data\npm\node_modules\hexo\node_modules\async\lib\async.js:495:34)
    at processImmediate [as _immediateCallback] (timers.js:330:15)
    5 条回复    1970-01-01 08:00:00 +08:00
    yx30
        1
    yx30  
    OP
       2014-03-05 21:37:09 +08:00
    body is not defined..看到这个错误但是不会处理,server指令 本地localhost:4000会显示内容,还有文章要怎么删除,没有找到删除指令。
    yx30
        2
    yx30  
    OP
       2014-03-05 22:02:00 +08:00
    T T..帖子沉了。。
    Sean
        3
    Sean  
       2014-03-05 22:39:30 +08:00 via iPhone   ❤️ 1
    body is not defined错误可能与ejs版本有关系,或者文件编码。

    删除文章:从source目录中删除md文件,然后重新hexo generate,或者hexo clean & hexo generate。
    yx30
        4
    yx30  
    OP
       2014-03-05 23:07:10 +08:00
    @Sean 万分感谢阿,折腾两天了,windows下搞不定,换到mac os下都成功了,。静态文件也部署上去了,但是访问域名404,我用的个人仓库是xxx.github.com。请问这是怎么回事,
    yx30
        5
    yx30  
    OP
       2014-03-06 23:33:16 +08:00
    原来是时间问题。会有延时。现问题已解决,
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3140 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 14:52 · PVG 22:52 · LAX 07:52 · JFK 10:52
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.