You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, would like to ask why would I get this error when I try to publish a string? Here attached are the errors stated in command prompt:
SyntaxError: Unexpected token è in JSON at position 0
at JSON.parse ()
at exports.JsonTransform (C:\Users\user\test-nestjs\node_modules\nest-mqtt\dist\mqtt.transform.js:4:17)
at C:\Users\user\test-nestjs\node_modules\nest-mqtt\dist\mqtt.explorer.js:108:36
at Array.map ()
at MqttClient. (C:\Users\user\test-nestjs\node_modules\nest-mqtt\dist\mqtt.explorer.js:105:82)
at MqttClient.emit (events.js:311:20)
at MqttClient._handlePublish (C:\Users\user\test-nestjs\node_modules\nest-mqtt\node_modules\mqtt\lib\client.js:1162:12)
at MqttClient._handlePacket (C:\Users\user\test-nestjs\node_modules\nest-mqtt\node_modules\mqtt\lib\client.js:351:12)
at work (C:\Users\user\test-nestjs\node_modules\nest-mqtt\node_modules\mqtt\lib\client.js:283:12)
at Writable.writable._write (C:\Users\user\test-nestjs\node_modules\nest-mqtt\node_modules\mqtt\lib\client.js:294:5)
The text was updated successfully, but these errors were encountered:
hidari358
changed the title
Tried to send a string but received an error
Tried to publish a string but received an error
May 15, 2020
Hi there, would like to ask why would I get this error when I try to publish a string? Here attached are the errors stated in command prompt:
SyntaxError: Unexpected token è in JSON at position 0
at JSON.parse ()
at exports.JsonTransform (C:\Users\user\test-nestjs\node_modules\nest-mqtt\dist\mqtt.transform.js:4:17)
at C:\Users\user\test-nestjs\node_modules\nest-mqtt\dist\mqtt.explorer.js:108:36
at Array.map ()
at MqttClient. (C:\Users\user\test-nestjs\node_modules\nest-mqtt\dist\mqtt.explorer.js:105:82)
at MqttClient.emit (events.js:311:20)
at MqttClient._handlePublish (C:\Users\user\test-nestjs\node_modules\nest-mqtt\node_modules\mqtt\lib\client.js:1162:12)
at MqttClient._handlePacket (C:\Users\user\test-nestjs\node_modules\nest-mqtt\node_modules\mqtt\lib\client.js:351:12)
at work (C:\Users\user\test-nestjs\node_modules\nest-mqtt\node_modules\mqtt\lib\client.js:283:12)
at Writable.writable._write (C:\Users\user\test-nestjs\node_modules\nest-mqtt\node_modules\mqtt\lib\client.js:294:5)
The text was updated successfully, but these errors were encountered: