Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ch3 Code Fails #10

Open
paboulos opened this issue Sep 8, 2015 · 1 comment
Open

Ch3 Code Fails #10

paboulos opened this issue Sep 8, 2015 · 1 comment

Comments

@paboulos
Copy link

paboulos commented Sep 8, 2015

Loaded and tested CouchDB with tasks worked OK. I am using Windows Powershell, localhost:3000 index page loads but no data.There is a server error when running the collection code:

PS D:\bkup\javascript\apis\Building-Hypermedia-APIs-master\nodejs\collection> node .\app.js
Express server listening on port 3000
scope option is deprecated and will be removed in EJS 3
TypeError: D:\bkup\javascript\apis\Building-Hypermedia-APIs-master\nodejs\collection/views/tasks.ejs:2
1| "items" : [

2|
3| {
4| "href" : "",
5| "data" : [

Cannot read property 'length' of undefined
at Object.eval (eval at (D:\bkup\javascript\apis\Building-Hypermedia-APIs-master\nodejs\collection\node_modules\ejs\lib\ejs.js:464:12), :10:22)
at returnedFn (D:\bkup\javascript\apis\Building-Hypermedia-APIs-master\nodejs\collection\node_modules\ejs\lib\ejs.js:493:17)
at ServerResponse.res._render (D:\bkup\javascript\apis\Building-Hypermedia-APIs-master\nodejs\collection\node_modules\express\lib\view.js:425:21)
at ServerResponse.res.render (D:\bkup\javascript\apis\Building-Hypermedia-APIs-master\nodejs\collection\node_modules\express\lib\view.js:318:17)
at Object.callback (D:\bkup\javascript\apis\Building-Hypermedia-APIs-master\nodejs\collection\app.js:49:9)
at D:\bkup\javascript\apis\Building-Hypermedia-APIs-master\nodejs\collection\node_modules\cradle\lib\cradle\database\documents.js:45:18
at Request._onResponse as _callback
at Request.self.callback (D:\bkup\javascript\apis\Building-Hypermedia-APIs-master\nodejs\collection\node_modules\cradle\node_modules\request\request.js:198:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request. (D:\bkup\javascript\apis\Building-Hypermedia-APIs-master\nodejs\collection\node_modules\cradle\node_mod

@paboulos
Copy link
Author

Updated libraries and code to latest versions. Still running into new problems, however I can get the view now by doing this:
var view = 'example/due_date';
db.view(view,) method instead of db.get(view,)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant