Closed
Description
I have react app which is created by create-react-app and follow the rules that provides here
https://github.com/mqttjs/MQTT.js#react
But when I start my app I am getting following error
constants.js:46 Uncaught ReferenceError: Buffer is not defined
at Object../node_modules/mqtt/node_modules/mqtt-packet/constants.js (constants.js:46:1)
at Object.options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:61:1)
at Object../node_modules/mqtt/node_modules/mqtt-packet/parser.js (parser.js:4:1)
at Object.options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:61:1)
at Object../node_modules/mqtt/node_modules/mqtt-packet/mqtt.js (mqtt.js:1:1)
I have look around similar to this issue but it didn't help me.
I am using react version 17.0.2 and react-scripts version 5.0.0
I am gone through this issue
#1294
But it didn't help me because I don't have any webpack config file on my react app.
Metadata
Metadata
Assignees
Labels
No labels