Is this the library issue, do I have to install any other module?
got it, had to change import from 'mqtt/dist/mqtt' instead of ''mqtt'
Most helpful comment
got it, had to change import from 'mqtt/dist/mqtt' instead of ''mqtt'