1

我想在我的 ember cli 应用程序中使用socket.io,所以我安装了:

bower install socket.io --save

并将以下行添加到我的Brocfile.js

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

这导致我的浏览器控制台出现两个错误:

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

有任何想法吗?

4

1 回答 1

2

最终使用socket.io-client导入没有错误。

app.import('bower_components/socket.io-client/socket.io.js');
于 2015-03-14T21:58:40.927 回答