0

i created a chat app using Node.JS + Socket.IO + TideSDK, actually my Node.JS+Socket.IO server work perfectly through browser, but when a try load the server with my TideSDK app this error happend: ReferenceError: Can't find variable: io

What's can be happend?

The code below is how i call the server.

<script src="https://mynodeserver.com/socket.io/socket.io.js"></script>
<script>
    var socket = io.connect('https://mynodeserver.com/');
</script>
Tom
  • 641
  • 2
  • 8
  • 21
  • The problem is probably that https://mynodeserver.com/socket.io/socket.io.js havent been loaded when you call var socket = io.connect(); You should probably wrap it in some kind of document.ready event (document.addEventListener('DOMContentLoaded',function(){var socket = io.connect('https://mynodeserver.com/');}) or similar. – Jesper Blaase Nov 25 '13 at 13:51
  • Thanks Jesper, i will try do this. – Tom Nov 25 '13 at 15:56
  • Jesper, you code work in Mac OS, but when i try run the app in Windows, the error appears. – Tom Nov 28 '13 at 22:17
  • @Tomazio Please see http://stackoverflow.com/questions/20723528/tidesdk-not-working-with-pusher – fairwinds Dec 29 '13 at 18:15
  • @fairwinds when the TideKit will be released? – Tom Jan 02 '14 at 19:03

0 Answers0