mikemintz/rethinkdb-websocket-server

RethinkDB 2.2 compatibility

stellanhaglund opened this issue · 12 comments

I'm using 0.3.2 and now I'm getting this error

/app/node_modules/rethinkdb-websocket-server/dist/ReqlTermExamples.js:109
  WAIT: _rethinkdb2['default'].wait(),
                               ^
TypeError: undefined is not a function

I haven't had any problems with that before..

Seems like the package.json file says ^2.2.0 for version 0.3.2, which installs 2.3.0 now, and I don't use 2.3.0 yet, could that be the issue?

tried using 0.5.1 and I get this instead
undefined:1 ERROR: Received an unsupported protocol version. This port is for RethinkDB qu ^ SyntaxError: Unexpected token E

Any Idea what it could be, im not able to start my application.

You should be able to use rethinkdb-websocket-server 0.5.1 with rethinkdb 2.3.

Perhaps there's something wrong with the npm-versioning for how I included the rethinkdb 2.2 driver in rethinkdb-websocket-server 0.3.2. I guess the ^ character can increase the minor version, which is normally fine, but the 2.3 driver had a backwards incompatible change.

But either way, the latest version should also be able to connect to rethinkdb 2.2. It looks like the error you pasted is not complete, can you see if you can paste the full error?

it's actually exaclty how its printed
skarmavbild 2016-04-19 kl 21 08 54

I was running it through a docker container and then I needed to rebuild the container then after that it doesn't work

I guess this is expected behavior, seeing the same error in rethinkdb/rethinkdb#5625

As a workaround, see if this works:

  • Create a new temporary node project with a dependency on "rethinkdb": "~2.2.1"
  • Run npm install in the temporary project
  • Copy the entire node_modules/rethinkdb directory from the temporary project to your actual project replacing node_modules/rethinkdb-websocket-server/node_modules/rethinkdb

As a more permanent solution, we should switch to using ~ instead of ^ for rethinkdb versions.

That's to bad that there is no easier way, i actually install all the
modules inside the docker container so then I will need to do these parts
in the build of the docker file, I tried to install rethinkdb 2.3.0 but it
only seems to find 2.2.6 using the apt part shown in the documentation so
I'm kind of stuck in the middle

2016-04-19 21:25 GMT+02:00 Mike Mintz notifications@github.com:

I guess this is expected behavior, seeing the same error in
rethinkdb/rethinkdb#5625
rethinkdb/rethinkdb#5625

As a workaround, see if this works:

  • Create a new temporary node project with a dependency on
    "rethinkdb": "~2.2.1"
  • Run npm install in the temporary project
  • Copy the entire node_modules/rethinkdb directory from the temporary
    project to your actual project replacing
    node_modules/rethinkdb-websocket-server/node_modules/rethinkdb

As a more permanent solution, we should switch to using ~ instead of ^
for rethinkdb versions.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#18 (comment)

you have no way to change the package.json file of the 0.3.2 version?

2016-04-19 21:29 GMT+02:00 Stellan Haglund sh@idly.se:

That's to bad that there is no easier way, i actually install all the
modules inside the docker container so then I will need to do these parts
in the build of the docker file, I tried to install rethinkdb 2.3.0 but it
only seems to find 2.2.6 using the apt part shown in the documentation so
I'm kind of stuck in the middle

2016-04-19 21:25 GMT+02:00 Mike Mintz notifications@github.com:

I guess this is expected behavior, seeing the same error in
rethinkdb/rethinkdb#5625
rethinkdb/rethinkdb#5625

As a workaround, see if this works:

  • Create a new temporary node project with a dependency on
    "rethinkdb": "~2.2.1"
  • Run npm install in the temporary project
  • Copy the entire node_modules/rethinkdb directory from the temporary
    project to your actual project replacing
    node_modules/rethinkdb-websocket-server/node_modules/rethinkdb

As a more permanent solution, we should switch to using ~ instead of ^
for rethinkdb versions.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#18 (comment)

I'll look into seeing if it's safe to publish a version older than the latest, but I won't have time until later this week.

In the meantime, you can fork the rethinkdb-websocket-server project on github, make a branch starting from the old version you want to use, make a commit updating package.json, and refer to that commit from your package.json using package.json github urls

FWIW I just commented the three offending reql options and it works fine for me as another workaround since I don't use those commands coffenbacher@ba81bc7

I don't think it makes sense to re-publish over 0.5.0, since published versions should probably be immutable. And unfortunately, I published 0.5.1 with rethinkdb 2.3 support as a patch, assuming it wouldn't break existing functionality, so there's no room for me to publish a version in between with semver.

For people still needing rethinkdb 2.2 support, I published a separate branch to github that you can use as an npm dependency. You can either use

"rethinkdb-websocket-server": "mikemintz/rethinkdb-websocket-server#b81d25d10e93ac0d2a2847ad1ae5becea19233f1"

or

"rethinkdb-websocket-server": "mikemintz/rethinkdb-websocket-server#legacy-rethinkdb-2.2"

The first format with the commit hash will deterministically refer to the version I just published. The second format with the branch name might change if I push more commits later.

I'm going to close this issue, but feel free to re-open if anyone still has trouble with rethinkdb 2.2 compatibility.