/usr/local/share/couchdb/server$ couchjs main.js
["add_fun","function(doc){emit(null,doc);}"]
true
["add_fun",44,"(function (doc) {if (doc.a == 4) {emit(null, doc.b);}})",93,10]
{"error": "compilation_error","reason": "expression does not eval to a
function. (44)"}

I'm just about out of ideas. My next step is to learn erlang and start
debugging, but I'd prefer not to do that right now.

Can anyone help?

Do not wrap your functions in parenthesis.

function(doc) { ... } instead of (function(doc) { ... }

Cheers
Jan
--

Reply via email to