Frage

I have created a JS bundle file from node-xmpp using Browserify but when I load my website I get the following error in the Google Chrome Javascript console:

Uncaught Error: Cannot find module 'dns' 

I tried installing the browser-request node package using npm install -g browser-request and to rebuild the JS bundle but I still get the same error.

What do I need to include/install in order to get rid of this error?

Note: I am using a debian server with the latest version of nodejs and Browserify

War es hilfreich?

Lösung

I found an commit that has not been added to the latest build yet that solved my problem.

https://github.com/dodo/node-xmpp/commit/a49e7be0e43885060aaf26c2772b41c618624f12

I've added a screenshot containing the changes for if the link dies: enter image description here

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top