【发布时间】:2015-11-30 06:30:49
【问题描述】:
我收到此错误Uncaught TypeError: _feathersClient2.default.primus is not a function
我的代码如下,我使用的是 ES6 和 babel 作为编译器。
import feathers from 'feathers-client';
const app = feathers().configure(feathers.primus({
transformer: 'sockjs',
pathname: '/primus',
}));
const locationService = app.service('location');
【问题讨论】:
-
这是 0.3.0 - 0.3.2 版本中的错误。我刚刚验证它已在 0.3.3 中修复。确保安装了该版本(或更高版本)应该可以解决问题。