Docpad运行,错误和警告

时间:2013-01-23 13:56:50

标签: docpad

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(Skeleteon)

得到了这个:

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诅咒的想法。谢谢。

1 个答案:

答案 0 :(得分: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等。

如果必须拥有该骨架,请等待它修复...