couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: test suite failing on views
Date Wed, 16 Jul 2008 09:09:17 GMT
>
>
> /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
--

Mime
View raw message