Search code examples
importember-clibroccolijs

How to import socket.io via brocfile for ember cli application?


I want to use socket.io in my ember cli application, so I installed with:

bower install socket.io --save

And added the following line to my Brocfile.js:

app.import('bower_components/socket.io/index.js');

This results in two errors in my browser console:

Uncaught ReferenceError: module is not defined
Uncaught Error: Could not find module ember-moment/helpers/moment

Any ideas?


Solution

  • Ended up using socket.io-client which imports without errors.

    app.import('bower_components/socket.io-client/socket.io.js');