I am new to NodeJS so this is probably an easy fix. However I was not able to find the solution with my current comprehension level.
I cloned the heroku-facebook-nodejs template from Github, and am trying to do some testing in the development environment on my local server. I am using nodejs version 0.6.10
https://github.com/heroku/facebook-template-nodejs
I modified the package.json as the following:
{
"name": "facebook-template-node",
"version": "0.0.1",
"description": "Template app for Heroku / Facebook integration, Node.js language",
"dependencies": {
"ejs": "0.4.3",
"everyauth": "0.2.18",
"express": "2.5.2",
"facebook-client": "1.3.0",
"facebook": "0.0.3",
"node-uuid": "1.2.0",
"socket.io": "0.8.7",
"connect": "1.8.5"
}
}
I removed the following:
require.paths.unshift(__dirname + '/lib');
and replaced
var socket_manager = require('socket_manager').create(io);
with
var socket_manager = require('lib/socket_manager').create(io);
and then ran npm-install -d to install the modules locally.
When I run node web.js, I get the following error:
system-process:hollow-cloud-1974 ericjang2004$ node web.js
The "sys" module is now called "util". It should have a similar interface.
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'oauth'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object.<anonymous> (/Users/Eric/Desktop/hollow-cloud-1974/node_modules/everyauth/lib/modules/oauth2.js:2:13)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
I am not sure how to proceed. Any tips? I read that Heroku uses an older version of Node, if that helps.
Add “oauth”: “0.9.5” to your dependencies in package.json, so it looks like:
and run
npm install -d