Hi, thanks for your reply.
I found the corresponding Jira issue. Wrapping the anonymous function in
parentheses did also work.
http://packages.debian.org/sid/couchdb states that SpiderMonkey has to
be 1.9.1 or newer, so I guess that's the problem I'm facing. So it seems
couchdb on debian sid is kinda broken, as in old apps may stop working.
Niklas
7.12.2011 17.26, Paul Davis kirjoitti:
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