create-react-app: Failed to import mqtt module after upgrading react-scripts to 0.4.1

I was using mqtt module with react-scripts v0.2.3 to build some sort of IoT web app. Everything was fine until I upgraded the react-scripts to v0.4.1. There was an error from the developer console:

Uncaught Error: process.binding is not supported from browser.js at line 173.

Removing the import mqtt from 'mqtt' or require('mqtt') solve the issue, but that’s not what I wanted. Any help would be appreciated. Thanks in advance!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 23 (8 by maintainers)

Most upvoted comments

Hi! Sorry for late response. I can not find both superagent-xml2jsparser and xml2js. However I managed to solve the problem by running my app inside docker container. I still have no idea why the app does not work on my host machine. But I think I am happy with my current solution, so I’m gonna close this issue now. Thank you!

Oh yes, I’m also using ubuntu 14.04 with node v4.5.0 and npm 3.10.6.

Thank you for the hint @themre! I’ll get back to this issue ASAP.