question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot find module 'bufferutil' during browserify

See original GitHub issue

npm list:

├─┬ angular-websocket@2.0.1
│ └─┬ ws@1.1.1
│   ├── options@0.0.6
│   └── ultron@1.0.2

App.js

(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)

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:10

github_iconTop GitHub Comments

8reactions
carn1xcommented, 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 of ws or does it make sense for these to be dependencies of this project directly?

4reactions
jacek-jaskolskicommented, Nov 8, 2017

If your client is in browser you can use my fork to resolve this issue. npm i jacek-jaskolski/angular-websocket --save

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'bufferutil' · Issue #232 · nexe/nexe - GitHub
in the build part use something like this. nexe.compile({ input: input_path, output: output_path, nodeVersion: '6.3.0', nodeTempDir: ...
Read more >
"Error: Cannot find module" when using browserify to bundle a ...
I run into the same problem and I have error first with bufferutil then with utf-8-validate , but according to this Readme.md, you...
Read more >
browserify with firebase+express (Error: Cannot find module ...
Error : Cannot find module 'request'. I am pretty new to browserify/express, so I could be doing something silly. Am I missing an...
Read more >
Browserify
Browserify lets you require('modules') in the browser by bundling up all of your dependencies. Install Documentation · Source Code · Help + Articles...
Read more >
"Cannot find module 'http'"? - help - Meteor forums
I need to load in the npm module socket.io. ... Uncaught Error: Cannot find module 'http' ... meteor npm install --save http-browserify
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found