【问题标题】:How to fix error using Kafka-node in Vue?如何在 Vue 中使用 Kafka-node 修复错误?
【发布时间】:2022-11-17 11:18:03
【问题描述】:

任何人在 vue.js 中使用 kafka-node 都会遇到这个错误

Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at Object.inherits (app.js:143477:46)
at ./node_modules/kafka-node/lib/wrapper/BrokerReadable.js (app.js:85751:6)
at __webpack_require__ (app.js:221491:42)
at ./node_modules/kafka-node/lib/wrapper/BrokerWrapper.js (app.js:85806:22)
at __webpack_require__ (app.js:221491:42)
at ./node_modules/kafka-node/lib/kafkaClient.js (app.js:81658:23)
at __webpack_require__ (app.js:221491:42)
at ./node_modules/kafka-node/lib/producerStream.js (app.js:83390:21)
at __webpack_require__ (app.js:221491:42)
at ./node_modules/kafka-node/kafka.js (app.js:77699:26)

【问题讨论】:

    标签: javascript vue.js apache-kafka


    【解决方案1】:

    Kafka 是一种事件流(我猜通常以某种方式连接到数据库)。
    Node.js 是后端运行时。

    这两件事都与像 VueJS 这样的前端完全无关(特别是如果不使用像 Nuxt 这样的东西),所以你可能误以为你可以混合使用两者。

    我们没有更多的上下文,但截至目前,仅阅读标题就表明从一开始就完全不兼容。

    【讨论】:

      猜你喜欢
      • 2014-09-25
      • 2022-11-21
      • 1970-01-01
      • 1970-01-01
      • 2022-07-03
      • 2021-10-24
      • 1970-01-01
      • 2022-11-11
      • 1970-01-01
      相关资源
      最近更新 更多