0

This is an angular app. I have a bower.json with a lot of libraries put like this:

"dependencies": {
    "angular": "^1.4.0",
    "bootstrap": "^3.2.0",
    ... 
    "angular-socket-io": "^0.7.0",
    "socket.io-client": "^1.7.2"

I run

bower install

and I can see that in the "bower_components"-folder there are folders and files for both "angular-socket-io" and "socket.io-client".

When I then run this command:

grunt serve

I can see that this one is included:

<script src="bower_components/angular-socket-io/socket.js"></script>

However, I cannot find any trace of "socket.io-client". Why? Am I supposed to include this manually? I wonder why then. All the other bower cmopoenents are beeing added autmatically of "grunt serve".

PS: This causes the error "io is not defined" when I try to instantiate a socket frmo a factory.

oderfla
  • 1,695
  • 4
  • 24
  • 49
  • 1
    try to look here http://stackoverflow.com/questions/8528681/where-is-the-socket-io-client-library – Lorenzo Marcon Mar 30 '17 at 15:08
  • Still getting more or less same problem. I tried with "overrides" and both adding "socket.io.js" and "dist/socket.io.js". I see that the file is inside the dist-fodler. However, the script is not been included. Any clue anybody? – oderfla Mar 31 '17 at 07:22

1 Answers1

0

I guess it was an issue with versions. Im running angular 1.4. Having this line:

"socket.io-client": "^0.7.10",

seems made the trick. Before I used latest version of socket.io-client (1.7). And I got incompatibility error. But now the socket-client is being loaded.

oderfla
  • 1,695
  • 4
  • 24
  • 49