I am working on a javascript based app and have started seeing these errors suddenly.
I got the error with Longjohn first (i have the module in my node_modules directory), but when i commented that, it started throwing issues with the next module required, which is "http:.
Other errors I see:
'web' is null or not an object - in this line : env.web.protocol
'io' is null or not an object - in a simple socketIO connect method.
define(['socket.io'], function(io) {
var socketConnection;
return {
getConnection: function() {
if (! socketConnection) {
socketConnection = io.connect();
}
return socketConnection;
}
}
All of this works fine under node, but has issues when running under IISNode. I tried simple express and node examples which work fine. I am using Node, IISNode, require.js, backbone and underscore in my project. I am new to javascript, would really appreciate any pointers to fixing this issue
This turned out to be an issue in the IISNode setup and reinstalling fixed it. However, I had to setup the IISNode handler again in the web.config file after the re-install. Not sure if uninstall removes the config details from applications as well.
<handlers>
<add name="my-app" path="index.js" verb="*" modules="iisnode" />
</handlers>