【问题标题】:Docpad Run, errors and warningsDocpad 运行、错误和警告
【发布时间】:2013-01-23 23:47:40
【问题描述】:

Node.js 和 Docpad 安装通过:http://docpad.org/docs/install

npm install -fg docpad@6.21

docpad 运行方式:http://docpad.org/docs/start

mkdir my-website cd my-website docpad run

选中6.) Hogan(骷髅)

得到了这个:

info: Installed the skeleton succesfully
info: DocPad listening to http://localhost:9778/ on directory c:\Users\DM\My Doc
uments\MDM\Web Projects\Client Projects\Web-Mart\Development\Website\out
info: LiveReload listening to new socket on channel /docpad-livereload with log
level 1
info: Generating...
warning:
  Rendering the extension "eco" to "html" on "index.html.eco" didn't do anything
.
  Explanation here: http://docpad.org/extension-not-rendering
warning:
  Rendering the extension "eco" to "html" on "footer.html.eco" didn't do anythin
g.
  Explanation here: http://docpad.org/extension-not-rendering
warning: Something went wrong while rendering: c:\Users\DM\My Documents\MDM\Web
Projects\Client Projects\Web-Mart\Development\Website\src\layouts\default.html.e
co
warning: Something went wrong while rendering: c:\Users\DM\My Documents\MDM\Web
Projects\Client Projects\Web-Mart\Development\Website\src\layouts\primary.html.e
co
warning: Something went wrong while rendering: c:\Users\DM\My Documents\MDM\Web
Projects\Client Projects\Web-Mart\Development\Website\src\documents\index.html.e
co
error: Something went wrong with the action
error: An error occured:
TypeError: Object #<Object> has no method 'getFileUrl'
    at Object.eval (eval at <anonymous> (C:\Users\DM\Documents\MDM\Web Projects\
Client Projects\Web-Mart\Development\Website\node_modules\docpad-plugin-eco\node
_modules\eco\lib\compiler.js:19:12))
    at Object.eval (eval at <anonymous> (C:\Users\DM\Documents\MDM\Web Projects\
Client Projects\Web-Mart\Development\Website\node_modules\docpad-plugin-eco\node
_modules\eco\lib\compiler.js:19:12))
    at eval (eval at <anonymous> (C:\Users\DM\Documents\MDM\Web Projects\Client
Projects\Web-Mart\Development\Website\node_modules\docpad-plugin-eco\node_module
s\eco\lib\compiler.js:19:12))
    at Function.eco.render (C:\Users\DM\Documents\MDM\Web Projects\Client Projec
ts\Web-Mart\Development\Website\node_modules\docpad-plugin-eco\node_modules\eco\
lib\index.js:26:25)
    at EcoPlugin.module.exports.EcoPlugin.render (C:\Users\DM\Documents\MDM\Web
Projects\Client Projects\Web-Mart\Development\Website\node_modules\docpad-plugin
-eco\out\eco.plugin.js:23:37)
    at Object.balUtilFlow.fireWithOptionalCallback (c:\Users\DM\AppData\Roaming\
npm\node_modules\docpad\node_modules\bal-util\out\lib\flow.js:39:27)
    at BasePlugin.bindEvents (c:\Users\DM\AppData\Roaming\npm\node_modules\docpa
d\out\lib\plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (c:\Users\DM\AppData\Roaming\
npm\node_modules\docpad\node_modules\bal-util\out\lib\flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (c:\Users\DM\AppData\Roaming\npm\nod
e_modules\docpad\node_modules\bal-util\out\lib\events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (c:\Users\DM\AppData\Roaming\
npm\node_modules\docpad\node_modules\bal-util\out\lib\flow.js:32:27)

我从来没有遇到过这些警告和错误,能够使用 docpad 会非常好,所以我很感激任何关于如何摆脱我看似 Docpad 诅咒的想法。谢谢你。

【问题讨论】:

    标签: docpad


    【解决方案1】:

    是的,骨架坏了,我不知道是谁在维护它。就像我在 IRC 中提到的那样,对于其他可能阅读/需要的人,我也会在这里发布......

    您可以使用空文件夹并从 shell 执行此操作,也可以只使用空模板:

    cd $(mktemp -d) && npm i docpad docpad-plugin-hogan && \
    mkdir -p src/{documents,files,layouts} && \
    curl https://raw.github.com/docpad/docpad-plugin-hogan/master/test/src/documents/hogan.html.hogan \
    > src/documents/index.html.hogan && docpad run
    

    应该可以证明 hogan 插件和 docpad 本身可以正常工作。 就我个人而言,我总是从 package.json 开始,但这正是我喜欢做的方式,在那里定义你需要的插件,但你也可以手动完成......或者使用基本的 HTML5 样板插件,然后添加docpad-plugin-hogan 等

    如果您必须拥有那个骨架,或者等到它修复...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多