0

I was trying to run the example of the everyauth module. However, I am having this error appearing when I type sudo node server.js

Error: Cannot find module '../restler'

I have been googling for a while but couldn't exactly find out the reason behind this error. Any suggestion?

rajan sthapit
  • 4,194
  • 10
  • 42
  • 66

3 Answers3

1

Are you running express3? I had the same issue, and as per

https://github.com/bnoguchi/everyauth/issues/359

found that the best option is to follow the express3 instruction at

https://github.com/bnoguchi/everyauth#installation

and install everyauth this way:

npm install git://github.com/bnoguchi/everyauth.git#express3

instead of the usual "npm install everyauth" method.

  • installing everyauth with #express3 causes everyauth@0.2.34 to be installed ... not that great with a current everyauth@0.4.5 – Rocco Sep 19 '13 at 00:07
0

Looks the viadeo adapter didn't get ported over to use @mikael's request module?

$ grep -ri restler .
./Changelog.md:- Use https://github.com/mikeal/request instead of restler.
./lib/modules/viadeo.js:  , rest = require('../restler');

You'll probably need to patch and submit a pull request.

broofa
  • 37,461
  • 11
  • 73
  • 73
  • I didn't get it. Which patch to apply and how? Can you please elaborate? – rajan sthapit Nov 16 '12 at 16:49
  • The problem is the viadeo adapter (inside everyauth) depends on the 'restler' module, which no longer ships with everyauth. Go to the everyauth github page and create an issue for this, then see what the author says. – broofa Nov 17 '12 at 03:36
  • broofa, you were spot on. I discovered the source of the problem independently after it was reported on github. – fruchtose Nov 22 '12 at 05:37
0

I tracked down this issue and submitted a pull request. There were two problems that I had to fix. Like broofa said, Restler was being referenced when it was no longer actually a dependency of Everyauth. The fix was to use the Request module instead.

There is also one more issue you would run into, even if you managed to fix this problem yourself. The example authentication server will throw an error on every run, due to the Weibo authentication module being misconfigured. Any other modules setup after it will throw an error, and that is exactly what happens when you run the example Everyauth server.

If you want a version of Everyauth that fixes the problems, see my fork of the project. I submitted a pull request to the main project, so hopefully that will be integrated soon.

fruchtose
  • 1,270
  • 2
  • 13
  • 16