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

Encounter problems when running Quickstart and A simple K/V store #8

Open
tailiu opened this issue Aug 29, 2015 · 1 comment
Open

Comments

@tailiu
Copy link

tailiu commented Aug 29, 2015

Hi, when I use the code in the Quickstart to boot up a three node cluster. I encounter the following problem:

node.peer(peer.addr());
^
TypeError: undefined is not a function

Do I need to change some codes provided in the readme? Thanks.

@tailiu tailiu changed the title Encounter problems when running Quickstart Encounter problems when running Quickstart and A simple K/V store Aug 29, 2015
@tailiu
Copy link
Author

tailiu commented Aug 29, 2015

In addition, In the A simple K/V store example, I simply copy the upper code into a file called db.js and the lower code into a file called cruise.js. Then I run cruise.js. I encounter the following problem:

db.js:18
cruise.on('data', function(data){
^
ReferenceError: cruise is not defined

So I add 'this' before 'cruise.on' and it becomes: this.cruise.on('data', function(data)...... I run cruise.js again. This time I encounter another problem:

db.js:30
this.cruise.peer(addr);
^
TypeError: undefined is not a function

I am a little confused and do I also need to further change some code to make it run successfully on my machine? Thanks

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