centrifuge - 连接到专用通道 сentrifuge 时如何更正错误?
问题描述
我正在使用 centrifuge-js尝试连接到使用此库创建的封闭通道时出现错误
sending AJAX request to /centrifuge/subscribe with data {"client":"2cfd8f14-d98b-4bab-b780-20b9d1782c91","channels":["$1e46a01dfb20dd5f57932f533593f19de5d13dee4b01f90cc4c3271a21af4332"]}
(node:26544) UnhandledPromiseRejectionWarning: TypeError: __webpack_require__.g.ActiveXObject is not a constructor
at Centrifuge._ajax (/home/anotheruser/centrifugotest/node_modules/centrifuge/dist/centrifuge.js:204:99)
at Centrifuge.stopSubscribeBatching (/home/anotheruser/centrifugotest/node_modules/centrifuge/dist/centrifuge.js:2367:24)
at Centrifuge._subscribe (/home/anotheruser/centrifugotest/node_modules/centrifuge/dist/centrifuge.js:1430:16)
at Subscription.subscribe (/home/anotheruser/centrifugotest/node_modules/centrifuge/dist/centrifuge.js:2847:24)
at Centrifuge.subscribe (/home/anotheruser/centrifugotest/node_modules/centrifuge/dist/centrifuge.js:2402:11)
at Centrifuge.<anonymous> (/home/anotheruser/centrifugotest/index.js:34:39)
at Centrifuge.emit (/home/anotheruser/centrifugotest/node_modules/centrifuge/dist/centrifuge.js:3150:5)
at Centrifuge._connectResponse (/home/anotheruser/centrifugotest/node_modules/centrifuge/dist/centrifuge.js:1588:12)
at /home/anotheruser/centrifugotest/node_modules/centrifuge/dist/centrifuge.js:668:18
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:26544) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
解决方案
推荐阅读
- python-3.x - Python Bokeh圆环图类别、子类别均值计算
- c# - 为什么用 viewbag 渲染数据会报错?
- microsoft-graph-api - Microsoft Graph 缺少站点
- vba - Excel VBA循环通过数据透视表并执行计算
- mysql - 主持人
不允许连接到此 MySQL 服务器尝试部署 IIS ASP.NET 网站 - javascript - 如何访问并平滑地将componentWillReceiveProps中的方法和this.state转换为getDerivedStateFromProps?
- python - PyEphem:通过解析字符串表示来转换负角度的问题
- django - Gunicorn 在某些页面上将 CPU 峰值提高到 100%...杀死性能
- c# - Visual Studio 2017 未执行任何代码,也未生成任何有意义的错误
- java - 使用 Java 8 谓词的 JPA 存储库过滤器