When I run my node app, I get this error message before it quits:
FATAL ERROR: v8::HandleScope::Close() Local scope has already been closed
By hunting around on the google groups, one theory I have is that I have a node module version conflict. But I’m not sure how to resolve it.
Note: I have another socket.IO server running on this machine. Could that be the culprit?
(function () {
"use strict";
var express = require("express");
var app = module.exports = express.createServer(),
util = require("util"),
socketIO = require("socket.io"),
connect = require("connect"),
Room = require("./rooms/models").Room,
User = require("./users/models").User,
Abuse = require("./abusers/models").Abuse,
guid = require("./utils").guid,
forceLatency = require("./utils").forceLatency,
latencyWrap = require("./utils").latencyWrap,
config = require("./config"),
log = require("./log"),
mergeStatic = require("./mergeStatic"),
geoip = require("geoip"),
httpdigest = require('http-digest'),
authServer = require('./authentication/server').authServer(),
feedbackServer = require('./feedback/server').feedbackServer(),
dnode = require("dnode");
var registerAppRoutes = function(app) {
//code code code
}
function registerSocketIO(app) {
// code code code
}
mergeStatic(function (jsHash, cssHash) {
app.helpers({
jsHash: jsHash,
cssHash: cssHash
});
registerAppRoutes(app);
registerSocketIO(app);
app.listen(config.port);
util.puts("Server started on port " + config.port);
});
}());
OK, so my hunch was right. I cleared out my node_modules directory with rm -rf and ran “node app.js” and then “npm install modulename” over and over until all my dependencies were fixed up. Can’t wait til node evolves a great dependency management solution!
Now everything’s working.