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

Error executing nodejs(0.12.4) with koa #16

Open
rohitgup14 opened this issue Aug 20, 2015 · 7 comments
Open

Error executing nodejs(0.12.4) with koa #16

rohitgup14 opened this issue Aug 20, 2015 · 7 comments

Comments

@rohitgup14
Copy link

$ node --harmony app.js
//rethinkdb-example-nodejs/todo-angular-koa/node_modules/rethinkdb/ast.js:127
if (!options.noreply && typeof callback !== 'function') {
^
TypeError: Cannot read property 'noreply' of undefined
at IndexWait.TermBase.run (//rethinkdb-example-nodejs/todo-angular-koa/node_modules/rethinkdb/ast.js:127:17)
at //rethinkdb-example-nodejs/todo-angular-koa/app.js:128:45
at TcpConnection. (//rethinkdb-example-nodejs/todo-angular-koa/node_modules/rethinkdb/net.js:78:16)
at TcpConnection.g (events.js:199:16)
at TcpConnection.emit (events.js:104:17)
at Socket.handshake_callback (//rethinkdb-example-nodejs/todo-angular-koa/node_modules/rethinkdb/net.js:459:23)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at TCP.onread (net.js:538:20)

@danielmewes
Copy link
Member

Thanks for the report @rohitgup14. That's weird. @deontologician any ideas?

@deontologician
Copy link
Contributor

This tutorial is pretty out of date, it has a RethinkDB 1.12 driver dependency. It's possible more recent versions have fixed this bug. It seems not to be checking if options is null, which would come up all the time.

@samkelleher
Copy link

Same error here running on node v4. The todo-angular-express-promise app gives this error Cannot read property 'noreply' of undefined on startup and is using version 2.0 of the driver, while the todo-angular-express works without problems - which interestingly is using a much older driver version (1.12.0).

Updated

todo-angular-express will continue to work when updated to the latest driver. The -promise version will also start to work when updated to the latest 2.1 driver. However, it needs some work as creating the new todos results in empty line items until the page is refreshed.

I'll stop back later to investigate.

@danielmewes
Copy link
Member

Thanks for letting us know @samkelleher.
Once you get things running with the latest driver, a pull request would be amazing so we can merge it into the example code :-)

@deontologician About the original issue: Do you think we could just bump the angular/koa example to using the latest driver?

@deontologician
Copy link
Contributor

I've bumped it and made it unbounded (not advised in general, but this is for a tutorial). I think longterm we should integrate these tutorials into our test-suite for new releases or deprecate them

@danielmewes
Copy link
Member

@deontologician Fair enough. Did you check that the code actually works with the new driver (in case we changed the syntax or name of some command)?

@deontologician
Copy link
Contributor

Nope, I just bumped it up. @samkelleher's comment suggests that it doesn't actually work, but since it didn't work anyway, the situation isn't really worse...

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

4 participants