Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

"docpad render" fails #269

Closed
mkdesu opened this Issue · 8 comments

2 participants

@mkdesu
> node_modules/docpad/bin/docpad render src/documents/posts/hello.html.md
asdasd
info: Welcome to DocPad v6.3.3
info: Environment: development
info: Plugins: cleanurls, eco, markdown
error: An error occured: consoleInterface is not defined ReferenceError: consoleInterface is not defined
    at ConsoleInterface.render (node_modules/docpad/out/lib/interfaces/console.js:214:24)
    at __bind (node_modules/docpad/out/lib/interfaces/console.js:4:61)
    at ConsoleInterface.performAction (node_modules/docpad/out/lib/interfaces/console.js:114:16)
    at _Class.next (node_modules/docpad/out/lib/docpad.js:1752:18)
    at _Class.balUtilFlow.Group._Class.exit (node_modules/docpad/node_modules/bal-util/out/lib/flow.js:309:14)
    at _Class.balUtilFlow.Group._Class.complete (node_modules/docpad/node_modules/bal-util/out/lib/flow.js:268:18)
    at balUtilFlow.Group._Class.completer (node_modules/docpad/node_modules/bal-util/out/lib/flow.js:280:31)
    at Object.DocPad.action.forward [as _onTimeout] (node_modules/docpad/out/lib/docpad.js:1775:23)
    at Timer.list.ontimeout (timers.js:101:19)

Using net-libs/nodejs-0.8.2 in Gentoo.
In DocPad 6.2 the problem was different — it could not find layouts.
Note also the asdasd garbage — it comes from cleanurls.

@balupton
Owner

Looking into it.

@balupton balupton closed this issue from a commit
@balupton balupton Pulled #251, Fixed #269, #268
We now only clear the meta attributes from the document attributes on a
new parse. Instead of clearing everything. Other parsing optimisations
were also made.

File IDs are now also the relativePath instead of the relativeBase to
avoid collisions.
b52226c
@balupton balupton closed this in b52226c
@balupton balupton reopened this
@balupton
Owner

There are other problems besides this introduced in v6.3.0. Writing a suite of tests for the docpad render command to ensure this doesn't happen again. Will be a bit.

@balupton
Owner

Published in v6.4.0

@mkdesu

The consoleInterface error (and asdasd) is gone, but now I see the error from v6.2 again:

> node_modules/docpad/bin/docpad render src/documents/posts/hello.html.md
error: An error occured: Could not find the specified layout: post Error: Could not find the specified layout: post
    at DocumentModel.getLayout (node_modules/docpad/out/lib/models/document.js:328:19)
    at DocumentModel.DocPad.createDocument.document.on.args (node_modules/docpad/out/lib/docpad.js:1151:16)
    at DocumentModel.Backbone.Events.trigger (node_modules/docpad/node_modules/query-engine/node_modules/backbone/backbone.js:163:27)
    at DocumentModel.emit (node_modules/docpad/out/lib/base.js:25:25)
    at DocumentModel.getLayout (node_modules/docpad/out/lib/models/document.js:320:14)
    at DocumentModel.getEve (node_modules/docpad/out/lib/models/document.js:344:14)
    at DocumentModel.contextualize (node_modules/docpad/out/lib/models/document.js:249:22)
    at DocumentModel.FileModel.contextualize (node_modules/docpad/out/lib/models/file.js:425:7)
    at DocumentModel.contextualize (node_modules/docpad/out/lib/models/document.js:248:45)
    at balUtilFlow.flow (node_modules/docpad/node_modules/bal-util/out/lib/flow.js:126:21)

Here are the locally installed packages (no globally installed ones):

> npm ls
├─┬ docpad@6.4.0 
│ ├─┬ airbrake@0.2.9 
│ │ ├─┬ hashish@0.0.4 
│ │ │ └── traverse@0.6.3 
│ │ ├── request@2.9.202 
│ │ ├── stack-trace@0.0.5 
│ │ └── xmlbuilder@0.1.5 
│ ├── bal-util@1.12.5 
│ ├─┬ caterpillar@1.1.1 
│ │ └─┬ cli-color@0.1.7 
│ │   └── es5-ext@0.8.2 
│ ├── coffee-script@1.3.3 
│ ├── commander@0.6.1 
│ ├─┬ cson@1.2.1 
│ │ └── js2coffee@0.1.3 
│ ├─┬ express@2.5.11 
│ │ ├─┬ connect@1.9.2 
│ │ │ └── formidable@1.0.11 
│ │ ├── mime@1.2.4 
│ │ ├── mkdirp@0.3.0 
│ │ └── qs@0.4.2 
│ ├── growl@1.4.1 
│ ├── mime@1.2.6 
│ ├─┬ query-engine@1.2.3 
│ │ └── backbone@0.9.2 
│ ├── semver@1.0.14 
│ ├── underscore@1.3.3 
│ ├─┬ watchr@2.1.2 
│ │ └── bal-util@1.11.2 
│ └── yaml@0.2.1 
├─┬ docpad-plugin-cleanurls@2.2.2 
│ └── coffee-script@1.3.3 
├─┬ docpad-plugin-eco@2.0.0 
│ └─┬ eco@1.1.0-rc-3 
│   ├── coffee-script@1.3.3 
│   └── strscan@1.0.1 
└─┬ docpad-plugin-markdown@2.0.1 
  └── github-flavored-markdown@1.0.1 
@mkdesu

Perhaps the problem has something to do with different versions of bal-util required by watchr (which I guess is used with “run”) and docpad proper? I am running npm update to update packages, is that not enough? Sorry if clueless.

@mkdesu

Err, had issue #270 in mind when writing the last comment — “run” vs. “server” is probably irrelevant here.

@balupton
Owner

docpad render has never supported rendering documents that reference other documents. It is only used for compiling single files... Technically, it is because we only parse that single file, and do not parse the source directory.

However, this is a common thing that is brought up... perhaps I should create a new docpad compile that functions as is, and change docpad render to do a parse of the source files. Will create a new issue for this change.

@balupton
Owner

Closing this in favour of issue #271

@balupton balupton closed this
@balupton balupton referenced this issue from a commit
@balupton balupton Pulled #251, Fixed #269, #268
We now only clear the meta attributes from the document attributes on a
new parse. Instead of clearing everything. Other parsing optimisations
were also made.

File IDs are now also the relativePath instead of the relativeBase to
avoid collisions.
cadbcf3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.