Cannot call method 'toJSON' of undefined #414

Open
ghost opened this Issue Jan 30, 2013 · 8 comments

Comments

Projects
None yet
5 participants
@ghost

ghost commented Jan 30, 2013


Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

@ghost ghost closed this Jan 30, 2013

@alexraasch

This comment has been minimized.

Show comment Hide comment
@alexraasch

alexraasch Mar 2, 2013

I'm having the exact same problem when working through the Beginner's Guide. Also tried downloading the reveal.js skeleton and I get these errors:

error: An error occured: 
Error: Couldn't find the selector slideOrder
at Query.compileSelector (/usr/local/lib/node_modules/docpad/node_modules/query-engine/out/lib/query-engine.js:1453:15)

And a little later:

warning: Something went wrong while rendering: /home/alexraasch/Dropbox/Projects/reveal.js-docpad/src/documents/index.html.coffee
error: Something went wrong with the action
error: An error occured: 
TypeError: Cannot call method 'toJSON' of undefined
at Object.<anonymous> (eval at <anonymous> (/home/alexraasch/Dropbox/Projects/reveal.js-docpad/node_modules/docpad-plugin-coffeekup/node_modules/coffeecup/lib/coffeecup.js:410:10))

I'm having the exact same problem when working through the Beginner's Guide. Also tried downloading the reveal.js skeleton and I get these errors:

error: An error occured: 
Error: Couldn't find the selector slideOrder
at Query.compileSelector (/usr/local/lib/node_modules/docpad/node_modules/query-engine/out/lib/query-engine.js:1453:15)

And a little later:

warning: Something went wrong while rendering: /home/alexraasch/Dropbox/Projects/reveal.js-docpad/src/documents/index.html.coffee
error: Something went wrong with the action
error: An error occured: 
TypeError: Cannot call method 'toJSON' of undefined
at Object.<anonymous> (eval at <anonymous> (/home/alexraasch/Dropbox/Projects/reveal.js-docpad/node_modules/docpad-plugin-coffeekup/node_modules/coffeecup/lib/coffeecup.js:410:10))

@balupton balupton reopened this Mar 4, 2013

@balupton

This comment has been minimized.

Show comment Hide comment
@balupton

balupton Mar 4, 2013

Owner

Please provide the source of the project that is causing the error.

@ alexraasch Does the html5 boilerplate skeleton work? I think the reveal.js skeleton may need some configuration - not sure as that skeleton is a user contributed one - not a core team one.

Owner

balupton commented Mar 4, 2013

Please provide the source of the project that is causing the error.

@ alexraasch Does the html5 boilerplate skeleton work? I think the reveal.js skeleton may need some configuration - not sure as that skeleton is a user contributed one - not a core team one.

@jamieowen

This comment has been minimized.

Show comment Hide comment
@jamieowen

jamieowen Mar 6, 2013

I think I'm having a similar error that may be related.
In a project I am working on ( based on the Boilerplate Skeleton ), doing something as simple as @getcollection("html").findAll({isPage:true}).toJSON() is giving me the above error.

Then when I create a new docpad project to test say the KitchenSink Skeleton it gives the error after installing :

docpad-plugin-livereload@2.3.0 node_modules/docpad-plugin-livereload
└── socket.io@0.9.13 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.11)
info: Installed the skeleton succesfully
info: DocPad listening to http://localhost:9778/ on directory /Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/out
info: LiveReload listening to new socket on channel /docpad-livereload with log level 1
info: Generating...
info: Skipped ignored file: markups/sass-to-css.css.sass
info: Skipped ignored file: nifties/async.html.coffee
info: Skipped ignored file: posts/ignored.html
warning: Something went wrong while rendering: /Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/src/documents/markups/javascript-to-coffeescript.coffee.js
error: Something went wrong with the action
error: An error occured:
TypeError: Cannot read property 'length' of undefined
    at /Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/node_modules/js2coffee/lib/helpers.coffee:113:29
    at Object.<anonymous> (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/node_modules/js2coffee/lib/helpers.coffee:120:5)
    at Object.<anonymous> (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/node_modules/js2coffee/lib/helpers.coffee:151:4)
    at Module._compile (module.js:449:26)
    at Object.require.extensions..coffee (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-coffeescript/node_modules/coffee-script/lib/coffee-script/coffee-script.js:30:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/node_modules/js2coffee/lib/js2coffee.coffee:12:36)
    at Object.<anonymous> (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/node_modules/js2coffee/lib/js2coffee.coffee:926:4)
    at Module._compile (module.js:449:26)
    at Object.require.extensions..coffee (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-coffeescript/node_modules/coffee-script/lib/coffee-script/coffee-script.js:30:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Js2coffeePlugin.module.exports.Js2coffeePlugin.renderJavaScriptToCoffeeScript (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/out/js2coffee.plugin.js:21:21)
    at Js2coffeePlugin.module.exports.Js2coffeePlugin.render (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/out/js2coffee.plugin.js:30:23)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at Html2coffeePlugin.module.exports.Html2coffeePlugin.render (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-html2coffee/out/html2coffee.plugin.js:43:18)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:46:9)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at HamlPlugin.module.exports.HamlPlugin.render (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-haml/out/haml.plugin.js:27:16)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at CoffeescriptPlugin.module.exports.CoffeescriptPlugin.render (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-coffeescript/out/coffeescript.plugin.js:31:16)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at CoffeekupPlugin.module.exports.CoffeekupPlugin.render (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-coffeekup/out/coffeekup.plugin.js:46:18)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at DocPad.actionRunnerInstance.total (/usr/local/lib/node_modules/docpad/out/lib/docpad.js:746:18)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:562:18)
    at _Class.balUtilFlow.Group._Class.serial (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:593:12)
    at _Class.balUtilFlow.Group._Class.sync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:588:19)
    at DocPad.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:52:13)
    at DocumentModel.DocPad.createDocument.document.on.args (/usr/local/lib/node_modules/docpad/out/lib/docpad.js:1588:30)
    at triggerEvents (/usr/local/lib/node_modules/docpad/node_modules/backbone/backbone.js:98:55)
    at DocumentModel.Backbone.Events.trigger (/usr/local/lib/node_modules/docpad/node_modules/backbone/backbone.js:186:19)
    at Object.DocumentModel.renderExtensions (/usr/local/lib/node_modules/docpad/out/lib/models/document.js:348:21)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:562:18)
    at _Class.balUtilFlow.Group._Class.serial (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:593:12)
    at _Class.balUtilFlow.Group._Class.sync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:588:19)
    at DocumentModel.renderExtensions (/usr/local/lib/node_modules/docpad/out/lib/models/document.js:363:11)
    at DocumentModel.render.tasks.push.file.renderDocument.opts.content (/usr/local/lib/node_modules/docpad/out/lib/models/document.js:464:21)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:562:18)
    at _Class.balUtilFlow.Group._Class.serial (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:593:12)
    at _Class.balUtilFlow.Group._Class.sync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:588:19)
    at DocumentModel.render (/usr/local/lib/node_modules/docpad/out/lib/models/document.js:496:11)
    at DocPad.renderFiles.renderFile (/usr/local/lib/node_modules/docpad/out/lib/docpad.js:2096:22)
    at DocPad.renderFiles.renderCollection (/usr/local/lib/node_modules/docpad/out/lib/docpad.js:2124:18)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.balUtilFlow.Group._Class.runTask.run [as _onTimeout] (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at Timer.list.ontimeout (timers.js:101:19)

One thing to note is I am receiving an error when installing a new project using docpad run on a clean directory. The same error was given with the Boilerplate Skeleton:

> ws@0.4.25 install /Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-livereload/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  SOLINK_MODULE(target) Release/bufferutil.node: Finished
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
  SOLINK_MODULE(target) Release/validation.node: Finished

I have tried installing socket.io and node-gyp independently. node-gyp installs fine but socket.io gives me the same error. I have also tried installing node-gyp globally as well, which was suggested on another github thread. But no joy there either. :)

I think I'm having a similar error that may be related.
In a project I am working on ( based on the Boilerplate Skeleton ), doing something as simple as @getcollection("html").findAll({isPage:true}).toJSON() is giving me the above error.

Then when I create a new docpad project to test say the KitchenSink Skeleton it gives the error after installing :

docpad-plugin-livereload@2.3.0 node_modules/docpad-plugin-livereload
└── socket.io@0.9.13 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.11)
info: Installed the skeleton succesfully
info: DocPad listening to http://localhost:9778/ on directory /Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/out
info: LiveReload listening to new socket on channel /docpad-livereload with log level 1
info: Generating...
info: Skipped ignored file: markups/sass-to-css.css.sass
info: Skipped ignored file: nifties/async.html.coffee
info: Skipped ignored file: posts/ignored.html
warning: Something went wrong while rendering: /Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/src/documents/markups/javascript-to-coffeescript.coffee.js
error: Something went wrong with the action
error: An error occured:
TypeError: Cannot read property 'length' of undefined
    at /Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/node_modules/js2coffee/lib/helpers.coffee:113:29
    at Object.<anonymous> (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/node_modules/js2coffee/lib/helpers.coffee:120:5)
    at Object.<anonymous> (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/node_modules/js2coffee/lib/helpers.coffee:151:4)
    at Module._compile (module.js:449:26)
    at Object.require.extensions..coffee (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-coffeescript/node_modules/coffee-script/lib/coffee-script/coffee-script.js:30:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/node_modules/js2coffee/lib/js2coffee.coffee:12:36)
    at Object.<anonymous> (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/node_modules/js2coffee/lib/js2coffee.coffee:926:4)
    at Module._compile (module.js:449:26)
    at Object.require.extensions..coffee (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-coffeescript/node_modules/coffee-script/lib/coffee-script/coffee-script.js:30:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Js2coffeePlugin.module.exports.Js2coffeePlugin.renderJavaScriptToCoffeeScript (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/out/js2coffee.plugin.js:21:21)
    at Js2coffeePlugin.module.exports.Js2coffeePlugin.render (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-js2coffee/out/js2coffee.plugin.js:30:23)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at Html2coffeePlugin.module.exports.Html2coffeePlugin.render (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-html2coffee/out/html2coffee.plugin.js:43:18)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:46:9)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at HamlPlugin.module.exports.HamlPlugin.render (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-haml/out/haml.plugin.js:27:16)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at CoffeescriptPlugin.module.exports.CoffeescriptPlugin.render (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-coffeescript/out/coffeescript.plugin.js:31:16)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at CoffeekupPlugin.module.exports.CoffeekupPlugin.render (/Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-coffeekup/out/coffeekup.plugin.js:46:18)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at BasePlugin.bindEvents (/usr/local/lib/node_modules/docpad/out/lib/plugin.js:57:26)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at balUtilFlow.Group._Class.completer (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:450:31)
    at DocPad.actionRunnerInstance.total (/usr/local/lib/node_modules/docpad/out/lib/docpad.js:746:18)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:562:18)
    at _Class.balUtilFlow.Group._Class.serial (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:593:12)
    at _Class.balUtilFlow.Group._Class.sync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:588:19)
    at DocPad.EventEmitterEnhanced.emitSync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/events.js:52:13)
    at DocumentModel.DocPad.createDocument.document.on.args (/usr/local/lib/node_modules/docpad/out/lib/docpad.js:1588:30)
    at triggerEvents (/usr/local/lib/node_modules/docpad/node_modules/backbone/backbone.js:98:55)
    at DocumentModel.Backbone.Events.trigger (/usr/local/lib/node_modules/docpad/node_modules/backbone/backbone.js:186:19)
    at Object.DocumentModel.renderExtensions (/usr/local/lib/node_modules/docpad/out/lib/models/document.js:348:21)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:562:18)
    at _Class.balUtilFlow.Group._Class.serial (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:593:12)
    at _Class.balUtilFlow.Group._Class.sync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:588:19)
    at DocumentModel.renderExtensions (/usr/local/lib/node_modules/docpad/out/lib/models/document.js:363:11)
    at DocumentModel.render.tasks.push.file.renderDocument.opts.content (/usr/local/lib/node_modules/docpad/out/lib/models/document.js:464:21)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at balUtilFlow.Group._Class.runTask.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.run (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:562:18)
    at _Class.balUtilFlow.Group._Class.serial (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:593:12)
    at _Class.balUtilFlow.Group._Class.sync (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:588:19)
    at DocumentModel.render (/usr/local/lib/node_modules/docpad/out/lib/models/document.js:496:11)
    at DocPad.renderFiles.renderFile (/usr/local/lib/node_modules/docpad/out/lib/docpad.js:2096:22)
    at DocPad.renderFiles.renderCollection (/usr/local/lib/node_modules/docpad/out/lib/docpad.js:2124:18)
    at Object.balUtilFlow.fireWithOptionalCallback (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.balUtilFlow.Group._Class.runTask.run [as _onTimeout] (/usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at Timer.list.ontimeout (timers.js:101:19)

One thing to note is I am receiving an error when installing a new project using docpad run on a clean directory. The same error was given with the Boilerplate Skeleton:

> ws@0.4.25 install /Users/jamieowen/Workbench/projects/test_docpad/ks_demo2/node_modules/docpad-plugin-livereload/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  SOLINK_MODULE(target) Release/bufferutil.node: Finished
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
  SOLINK_MODULE(target) Release/validation.node: Finished

I have tried installing socket.io and node-gyp independently. node-gyp installs fine but socket.io gives me the same error. I have also tried installing node-gyp globally as well, which was suggested on another github thread. But no joy there either. :)

@kidfribble

This comment has been minimized.

Show comment Hide comment
@kidfribble

kidfribble Mar 24, 2013

I have the same issue as @alexraasch, but ONLY on reveal.js. I'll report a bug there and see what gets done.

I have the same issue as @alexraasch, but ONLY on reveal.js. I'll report a bug there and see what gets done.

@SteveMcArthur

This comment has been minimized.

Show comment Hide comment
@SteveMcArthur

SteveMcArthur Apr 9, 2013

Contributor

The problem in reveal.js seems to be the call to database.findAllLive at the bottom of the docpad.coffee file. At the moment it reads:

database.findAllLive({tags: $has: 'slide', slideOrder: $exists: true},{slideOrder:1})

It should be (note the tags and slideOrder properties):

database.findAllLive({tags: {$has: 'slide'}, slideOrder: {$exists: true}},{slideOrder:1})

--Edit
Just had a further thought. The original code is coffeeScript - so should in theory work. The two properties, tags and slideOrder should be passed as part of the first argument to findAllLive. But it looks like slideOrder is being passed as the second parameter! My CoffeeScript is not the best - so not sure what is happening

Contributor

SteveMcArthur commented Apr 9, 2013

The problem in reveal.js seems to be the call to database.findAllLive at the bottom of the docpad.coffee file. At the moment it reads:

database.findAllLive({tags: $has: 'slide', slideOrder: $exists: true},{slideOrder:1})

It should be (note the tags and slideOrder properties):

database.findAllLive({tags: {$has: 'slide'}, slideOrder: {$exists: true}},{slideOrder:1})

--Edit
Just had a further thought. The original code is coffeeScript - so should in theory work. The two properties, tags and slideOrder should be passed as part of the first argument to findAllLive. But it looks like slideOrder is being passed as the second parameter! My CoffeeScript is not the best - so not sure what is happening

@SteveMcArthur SteveMcArthur referenced this issue in DjebbZ/revealjs-docpad Apr 10, 2013

Open

Installation failures! Oh no! #2

@balupton

This comment has been minimized.

Show comment Hide comment
@balupton

balupton Apr 24, 2013

Owner

Unfortunately I don't have access to the reveal.js skeleton to fix it, but I can delete it from the official listing. Are people okay with that?

Owner

balupton commented Apr 24, 2013

Unfortunately I don't have access to the reveal.js skeleton to fix it, but I can delete it from the official listing. Are people okay with that?

@SteveMcArthur

This comment has been minimized.

Show comment Hide comment
@SteveMcArthur

SteveMcArthur Apr 24, 2013

Contributor

I'm not all that keen - its quite a nice skeleton and it seems the problem is quite simple.

Contributor

SteveMcArthur commented Apr 24, 2013

I'm not all that keen - its quite a nice skeleton and it seems the problem is quite simple.

@SteveMcArthur

This comment has been minimized.

Show comment Hide comment
@SteveMcArthur

SteveMcArthur Apr 25, 2013

Contributor

@balupton Ok - I get what you mean. The skeleton is read only on github (doh!)

Contributor

SteveMcArthur commented Apr 25, 2013

@balupton Ok - I get what you mean. The skeleton is read only on github (doh!)

brstream pushed a commit to plumvillage/happyfarm that referenced this issue Jan 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment