Environment Information
Steps to Reproduce
I attached here a short Angular 6 project. Here is the instruction how to re-produce the issue:
poc-kafka-typescript.zip
You will get this log in command line:
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2018-05-23T04:54:39.511Z
Hash: 11353a5e57a0e9be836e
Time: 2817ms
chunk {main} main.js, main.js.map (main) 1.96 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 695 bytes [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 15.6 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 325 kB [initial] [rendered]
ERROR in node_modules/node-rdkafka/index.d.ts(1,36): error TS2307: Cannot find module 'stream'.
node_modules/node-rdkafka/index.d.ts(5,29): error TS2552: Cannot find name 'NodeJS'. Did you mean 'Node'?
node_modules/node-rdkafka/index.d.ts(174,10): error TS2304: Cannot find name 'Buffer'.
ℹ 「wdm」: Failed to compile.
node-rdkafka Configuration Settings
'localhost', '9092', 'hello-world-group'
Additional context
we use "kafka-typescript" library which, in turn, uses node-rdkafka
Hi!
You won't be able to connect to Kafka from a web browser. You'll need a backend system in place that your angular app can communicate with, and that system can connect to Kafka. The kafka-typescript library is intended for use in Node.js applications, not Angular applications.
Most helpful comment
Hi!
You won't be able to connect to Kafka from a web browser. You'll need a backend system in place that your angular app can communicate with, and that system can connect to Kafka. The kafka-typescript library is intended for use in Node.js applications, not Angular applications.