Here was a suggestion: https://github.com/btford/angular-socket-io/issues/127
make sure you have the socket.io client library:
bower install socket.io-client --save
This did not fix my problem with the same error.
including in index.html:
script src="lib/angular-socket-io/socket.js"
in app.js
angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', 'starter.directives', 'btford.socket-io'])
in services.js
.factory('seatStatusSocket',function(socketFactory){ var myIoSocket = io.connect(porturl); // io is not defined here, suddenly.
It worked before using a remote copy of lib. When this error started, I changed index.html to link the local copy, since this remote version also received a Bad Gateway error (now this is normal, but the io socket is still not defined as indicated above).
deleted:
script src="http://chat.socket.io/socket.io/socket.io.js"
version
socket.io@1.3.7 node_modules/socket.io node --version v0.12.7
You should include in index.html:
script src="<bowerComponentPath>/socket.io-client/socket.io.js"
before:
script src="<bowerComponentPath>/angular-socket-io/socket.js"
and yest is required:
Source: https://habr.com/ru/post/1234771/More articles:Create 30 minute intervals with a given date and time - androidHow can I calculate the zero space / core (x: M ยท x = 0) of a sparse matrix in Python? - pythonconfigure the "--prefix" parameter for cross-compiling - linuxHow to run the Android application in all connected devices or emulators simultaneously with Android Studio? - androidCannot create configuration file for Google Analytics integration in Android - androidIOS app - sending emails in the background using Swift - iosAngular 2 blocks with karma - unit-testingSending automatic email using Swift and Xcode 6 - emailWhat do I need to do so that my Java application does not start loading Java 6 on OS X - javaHow to enable SSL in MVC 6 application? - visual-studio-2015All Articles