Question
How To Install Express, a Node.js Framework, and Set Up Socket.io on a VPS...Part 4: The Server Code
Following the tutorial mentioned above, part 4, rewriting app.js,
I get this error, any suggestion on how to correct it?
/root/socketio-test/app.js:9
var app = express();
^
TypeError: object is not a function
at Object.<anonymous> (/root/socketio-test/app.js:9:11)
at Module.compile (module.js:456:26)
at Object.Module.extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×