Nexe: Cannot find module 'bufferutil'

Created on 6 Jun 2016  路  7Comments  路  Source: nexe/nexe


----> executing browserify via API
events.js:160
throw er; // Unhandled 'error' event
^
Error: Cannot find module 'bufferutil' from '/node_modules/ws/lib'
at /usr/local/lib/node_modules/nexe/node_modules/resolve/lib/async.js:46:17
at process (/usr/local/lib/node_modules/nexe/node_modules/resolve/lib/async.js:173:43)
at ondir (/usr/local/lib/node_modules/nexe/node_modules/resolve/lib/async.js:188:17)
at load (/usr/local/lib/node_modules/nexe/node_modules/resolve/lib/async.js:69:43)
at onex (/usr/local/lib/node_modules/nexe/node_modules/resolve/lib/async.js:92:31)
at /usr/local/lib/node_modules/nexe/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:117:15)

Most helpful comment

I had this issue as well. I fixed it by installing the following packages (the --save option is important)
npm install --save bufferutil
and then
npm install --save utf-8-validate

This needs to be fixed soon.

All 7 comments

I had this issue as well. I fixed it by installing the following packages (the --save option is important)
npm install --save bufferutil
and then
npm install --save utf-8-validate

This needs to be fixed soon.

I believe all they have to do is update their package.json file to include these dependencies. .

I can confirm the same exact problem, my project is using Socket.io

we should not be bundling socket.io in nexe
in the build part use something like this.

nexe.compile({ input: input_path, output: output_path, nodeVersion: '6.3.0', nodeTempDir: node_temp_dir, nodeConfigureArgs: ['opt', 'val'], nodeMakeArgs: ['-j', '8'], nodeVCBuildArgs: ['nosign', 'x64'], flags: true, jsFlags: '--use_strict', framework: 'node', browserifyExcludes: [ 'socket.io', 'socket.io-client', 'socket.io-parser', 'socket.io-adapter', ], }, (err) => { if (err) { console.log(err); } });

we should not be bundling socket.io in nexe

@rahul-dutt-sharma I am new to nexe. Why shouldn't we bundle socket.io in nexe? How else will socket.io work within the compiled app? What am I missing? Thanks.

Had the exact same problem. Tip from @medemi68 worked.

There isn't a reason to not bundle socket.io. Fixed in nexe@beta closing

Was this page helpful?
0 / 5 - 0 ratings