Hi!
I tried 3 js scripts (all using polling.js) and got the same error for all 3 (server_data.js, server_socket.js and server_chart.js) :
login as: root
root@clanton:~/tinyWebServer# ls
Chart_min.js basicserver.js data.ejs jquery_1_11_1_min.js server.js server_chart.js server_express.js views
- action.ejs chart.ejs index.ejs node_modules server_basic.js server_data.js server_socket.js
root@clanton:~/tinyWebServer# node server_chart.js
/home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js:23
var xhr = new XMLHttpRequest({ agent: this.agent, xdomain: false });
^
TypeError: object is not a function
at /home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js:23:13
at Object.<anonymous> (/home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js:25:3)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling-xhr.js:6:15)
at Module._compile (module.js:449:26)
root@clanton:~/tinyWebServer# node server_data.js
/home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js:23
var xhr = new XMLHttpRequest({ agent: this.agent, xdomain: false });
^
TypeError: object is not a function
at /home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js:23:13
at Object.<anonymous> (/home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js:25:3)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling-xhr.js:6:15)
at Module._compile (module.js:449:26)
root@clanton:~/tinyWebServer# node server_socket.js
/home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js:23
var xhr = new XMLHttpRequest({ agent: this.agent, xdomain: false });
^
TypeError: object is not a function
at /home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js:23:13
at Object.<anonymous> (/home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js:25:3)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/home/root/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling-xhr.js:6:15)
at Module._compile (module.js:449:26)
root@clanton:~/tinyWebServer#
All the modules were installed wirth NPM as per the instructions in : http://senzations.net/wp-content/uploads/2014/66/Senzations14-Networking-nodejs.pdf .
And scripts are untouched.
Arnold