Kafka在《reactjs》中被整合后,出现了如下问题。
kafkaClient.js:728 Uncaught TypeError: net.createConnection is not a function
at KafkaClient.push../node_modules/kafka-node/lib/kafkaClient.js.KafkaClient.createBroker (kafkaClient.js:728)
at KafkaClient.push../node_modules/kafka-node/lib/kafkaClient.js.KafkaClient.setupBroker (kafkaClient.js:314)
at KafkaClient.push../node_modules/kafka-node/lib/kafkaClient.js.KafkaClient.connectToBroker (kafkaClient.js:253)
at kafkaClient.js:198
at Object.doWhilst (async.js:3149)
at KafkaClient.push../node_modules/kafka-node/lib/kafkaClient.js.KafkaClient.connectToBrokers (kafkaClient.js:197)
at kafkaClient.js:155
at async.js:4041
at replenish (async.js:1041)
at async.js:1047
at eachOfLimit (async.js:1073)
at async.js:1078
at _parallel (async.js:4040)
at Object.series (async.js:4917)
at RetryOperation._fn (kafkaClient.js:154)
at RetryOperation.push../node_modules/retry/lib/retry_operation.js.RetryOperation.attempt (retry_operation.js:104)
at KafkaClient.push../node_modules/kafka-node/lib/kafkaClient.js.KafkaClient.connect (kafkaClient.js:146)
at new KafkaClient (kafkaClient.js:100)
at Module.<anonymous> (MessageList.js:16)
at Module../src/components/MessageList.js (MessageList.js:188)
at __webpack_require__ (bootstrap:782)
at fn (bootstrap:150)
at Module../src/App.js (App.css?da7c:45)
at __webpack_require__ (bootstrap:782)
at fn (bootstrap:150)
at Module../src/index.js (index.css?02e3:45)
at __webpack_require__ (bootstrap:782)
at fn (bootstrap:150)
at Object.0 (Request.js:37)
at __webpack_require__ (bootstrap:782)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at main.chunk.js:1
请帮忙,如何解决reactjs中的Kafka节点问题?
暂无答案!
目前还没有任何答案,快来回答吧!