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?
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.
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.
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.