btford / angular-socket-io-seed

A great starting point for writing AngularJS apps backed by a Socket.io-powered node.js server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no method "address"

macadames opened this issue · comments

Running node.exe under windows7 it was really complex to install these dependencies (npm install do not work) :

  • socket.io
  • socket.io-client
  • uglify.js
  • activex-offuscator

And finally, after a really complex manual installation i got this traceback :

C:\temp >> node app.js

Warning: express.createServer() is deprecated, express
applications no longer inherit from http.Server,
please use:

var express = require("express");
var app = express();

Socket.IO's listen() method expects an http.Server instance
as its first parameter. Are you migrating from Express 2.x to 3.x?
If so, check out the "Socket.IO compatibility" section at:
https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to-3.x
info - socket.io started

C:\temp\angular-socket-io-seed\app.js:52
console.log("Express server listening on port %d in %s mode", app.address().
^
TypeError: Object function app(req, res){ app.handle(req, res); } has no method 'address'
at Server. (C:\instances\appjs\angular-socket-io-seed\app.js:52:69)
at Server.g (events.js:185:14)
at Server.EventEmitter.emit (events.js:85:17)
at Server._listen2 (net.js:921:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)

It sounds like you installed Express 3.x when I have listed 2.x as the dependency. Check package.json for the correct version numbers.

Also consider not using Windows. ;)

Hmm, windows is not always a choice.

The most of node pakages could be installed/updated using npm, express is an exception.

I hope i would be able to test your product quickly

Many thanks