You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: Cannot find module 'bufferutil' during browserify #103
(function() {
var angular_websocket;
angular_websocket = require('angular-websocket');
}).call(this);
Command browserify app.js -o bundle.js gives:
Error: Cannot find module 'bufferutil' from '/www/node_modules/angular-websocket/node_modules/ws/lib'
at /usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:46:17
at process (/usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:173:43)
at ondir (/usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:188:17)
at load (/usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
at onex (/usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
at /usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:82:15)
Fixed with npm install bufferutil utf-8-validate, and I suspect this issue is probably not within the scope of angular-websockets to fix. Should these actually be dependencies of ws or does it make sense for these to be dependencies of this project directly?
Reacted by Elvis Ratzlaff, Josh Wyatt, Chad Johnson, Gastón Silva, Tanguy Vaessen, Serge, Jason, Nick Laros and Johan Mazzo
I've not needed to install those dependencies, because anyway when I running the node.js server, it throw an error in socket.io, so what I've done is exclude those dependencies bufferutil and utf-8-validate when run browserify on the terminal or as statement so this way -u bufferutil -u utf-8-validate.
Drive by comment, I came across this same error when including ws in the client side. It's actually not needed on the client side and browsers should use the native WebSocket constructor. See this issue for more information: websockets/ws#423
Activity
carn1x commentedon Oct 10, 2016
Fixed with
npm install bufferutil utf-8-validate, and I suspect this issue is probably not within the scope of angular-websockets to fix. Should these actually be dependencies ofwsor does it make sense for these to be dependencies of this project directly?Remco75 commentedon Nov 18, 2016
nope, I think this is somewhere within this module: webpack doesnt work as well.
some code has changed so it tries to load to much it seems :-(
chaddjohnson commentedon Feb 28, 2017
I vote for
bufferutilandutf-8-validatebeing added as dependencies ofangular-websocket. Is there a reason the author didn't do this?Ocramius commentedon Apr 19, 2017
This was handled in fdfea1f
odedniv commentedon Jul 30, 2017
Don't you need this in production? (was added to
devDependencies)danielpiedra commentedon Sep 4, 2017
any insights here? i believe @odedniv is right..
krobing commentedon Sep 6, 2017
I've not needed to install those dependencies, because anyway when I running the node.js server, it throw an error in socket.io, so what I've done is exclude those dependencies
bufferutilandutf-8-validatewhen run browserify on the terminal or as statement so this way-u bufferutil -u utf-8-validate.belfz commentedon Sep 7, 2017
I'm facing similar problem (with webpack):
joeyrobert commentedon Oct 12, 2017
Drive by comment, I came across this same error when including
wsin the client side. It's actually not needed on the client side and browsers should use the nativeWebSocketconstructor. See this issue for more information: websockets/ws#423jacek-jaskolski commentedon Nov 8, 2017
If your client is in browser you can use my fork to resolve this issue.
npm i jacek-jaskolski/angular-websocket --saveAraevin commentedon Mar 6, 2025
This seems to have been deleted. I needed it for an old project. In case anyone is here looking for it, I have it up at 'Araevin/angular-websocket'.