MQTT.js
MQTT.js copied to clipboard
[email protected] run mqtt fail
`ERROR in ./node_modules/readable-stream/lib/_stream_readable.js 46:13-37 Module not found: Error: Cannot find file: 'index.js' does not match the corresponding name on disk: './node_modules/buffer/Buffer'. @ ./node_modules/readable-stream/readable-browser.js 1:10-63 @ ./node_modules/mqtt/lib/client.js 12:15-50 @ ./node_modules/mqtt/lib/connect/index.js 3:17-37 @ ./src/App.js 8:0-24 27:17-29 @ ./src/index.js 7:0-24 11:33-36
ERROR in ./node_modules/readable-stream/lib/_stream_writable.js 70:13-37 Module not found: Error: Cannot find file: 'index.js' does not match the corresponding name on disk: './node_modules/buffer/Buffer'. @ ./node_modules/readable-stream/readable-browser.js 4:0-55 @ ./node_modules/mqtt/lib/client.js 12:15-50 @ ./node_modules/mqtt/lib/connect/index.js 3:17-37 @ ./src/App.js 8:0-24 27:17-29 @ ./src/index.js 7:0-24 11:33-36
ERROR in ./node_modules/readable-stream/lib/internal/streams/buffer_list.js 74:15-32 Module not found: Error: Cannot find file: 'index.js' does not match the corresponding name on disk: './node_modules/buffer/Buffer'. @ ./node_modules/readable-stream/lib/_stream_readable.js 72:17-58 @ ./node_modules/readable-stream/readable-browser.js 1:10-63 @ ./node_modules/mqtt/lib/client.js 12:15-50 @ ./node_modules/mqtt/lib/connect/index.js 3:17-37 @ ./src/App.js 8:0-24 27:17-29 @ ./src/index.js 7:0-24 11:33-36
ERROR in ./node_modules/string_decoder/node_modules/safe-buffer/index.js 4:13-30 Module not found: Error: Cannot find file: 'index.js' does not match the corresponding name on disk: './node_modules/buffer/Buffer'. @ ./node_modules/string_decoder/lib/string_decoder.js 24:13-42 @ ./node_modules/readable-stream/lib/_stream_readable.js 163:40-80 325:38-78 @ ./node_modules/readable-stream/readable-browser.js 1:10-63 @ ./node_modules/mqtt/lib/client.js 12:15-50 @ ./node_modules/mqtt/lib/connect/index.js 3:17-37 @ ./src/App.js 8:0-24 27:17-29 @ ./src/index.js 7:0-24 11:33-36
`
same here. webpack 5 has removed support for node buffer.
same. is there any fix or workaround in sight?
Only this worked for me. But it's a really raw workaround.
This is an automated message to let you know that this issue has gone 365 days without any activity. In order to ensure that we work on issues that still matter, this issue will be closed in 14 days.
If this issue is still important, you can simply comment with a "bump" to keep it open.
Thank you for your contribution.
This issue was automatically closed due to inactivity.