خرید بک لینک

Vote count: 0

I am having serever.js file which contains the below code. I am having another package.json file which have dependencies. I later added underscore dependency to the existing dependency. It's throwing error on require("socket.io")(http) as require(...) is not a function. When I run the file using command node server error is coming after adding dependency.

var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var http = require('http').Server(app);
var io = require("socket.io")(http);

package.json

"dependencies": {
"express": "~3.4.0",
"jade": "*",
"socket.io": "0.8.x",
"logfmt": "~1.1.2",
"nodemailer": "~0.7.0",
"mongoose": "^4.2.4",
"body-parser": "~1.4.3",
"underscore": "~1.5.2" // when I add this line error is coming.

}

Can some one suggest me on this.

asked 3 mins ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 1 ارديبهشت 1395 ساعت: 13:49

صفحه بندی