DEV Community

Discussion on: A taste of MQTT in React

Collapse
 
corlys profile image
corlys

when i copy the code to the app js, it gives an error of
TypeError: tls.connect is not a function, do you know what's wrong?

Collapse
 
preciouschicken profile image
Precious Chicken

Sorry for the delay in responding (didn't get a notification).

Not sure what's wrong here; tls.connect does not appear within the code, so unsure why this is throwing an error.

You could try downloading the repo and running that directly, just in case there was an error somewhere in copy and paste: github.com/PreciousChicken/taste_o...