node-examples icon indicating copy to clipboard operation
node-examples copied to clipboard

Error while running.

Open chirag04 opened this issue 14 years ago • 1 comments

I was trying to run the tic tac toe game but got this error.

throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Object function createServer() { if ('object' == typeof arguments[0]) { return new HTTPSServer(arguments[0], Array.prototype.slice.call(arguments, 1)); } else { return new HTTPServer(Array.prototype.slice.call(arguments)); } } has no method 'staticProvider' at Object. (/media/PENDRIVE/05#tictactoe/server.js:143:15) at Module._compile (module.js:402:26) at Object..js (module.js:408:10) at Module.load (module.js:334:31) at Function._load (module.js:293:12) at Array. (module.js:421:10) at EventEmitter._tickCallback (node.js:126:26)

I'm missing something? I have installed all the required modules.

chirag04 avatar Oct 19 '11 13:10 chirag04

Chirag: You will have to edit the server.js file Online 143 or 144 you will find a connect.staticProvider({blah-blah..
Change it to this: connect.static({blah-blah.. That should get it working

daynight avatar Oct 19 '11 15:10 daynight