Looks like you've got a Spidermonkey that's too new for CouchJS. You
can either change that to something older or you should be able to
change your map function to something like:

function map(doc) {
    if(doc.type && doc.type == "care_target") {
        emit([doc.customer, doc.name], {name: doc.name});
    }
}

2011/12/7 Niklas Närhinen <[email protected]>:
> Hi,
> it seems something has changed in the way how couchdb transforms the json
> strings to map etc functions.
>
> Here is what I'm getting after upgrading to 1.1.1 and querying a view (in
> futon):
>
> Error: compilation_error
>
> Expression does not eval to a function. ((new String("function(doc) {\n\tif
> (doc.type && doc.type == \"care_target\") {\n\t\temit([doc.customer,
> doc.name], {name: doc.name});\n\t}\n}")))
>
> Any ideas? (btw, both 1.1.0 and 1.1.1 are from debian unstable)
>
> Niklas

Reply via email to