I was trying to use browerify and got this error
I tried to typebrowserify index.js -o bundle.js
and got the following error
SyntaxError: Unexpected character '�' (1:0) while parsing /Users/stuff/node_modules/opencv4nodejs/build/Release/opencv4nodejs.node while parsing file: /Users/stuff/node_modules/opencv4nodejs/build/Release/opencv4nodejs.node
at DestroyableTransform.end [as _flush] (/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/index.js:114:21)
at DestroyableTransform.prefinish (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_transform.js:138:10)
at DestroyableTransform.emit (events.js:198:13)
at prefinish (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js:619:14)
at finishMaybe (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js:627:5)
at endWritable (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js:638:3)
at DestroyableTransform.Writable.end (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js:594:41)
at DestroyableTransform.onend (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js:577:10)
at Object.onceWrapper (events.js:286:20)
at DestroyableTransform.emit (events.js:203:15)
MayingsMBP1316:webcam MattMachine$ browserify index.js -o bundle.js
in index.js i have following requires
const cv = require('opencv4nodejs')
const path = require('path');
const express = require('express');
const app = express();
const server = require('http').Server(app);
const io = require('socket.io')(server);
const iota = require('./iotaModule');
in index.html
<script src = "https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.1.1/socket.io.js"></script>
<script type='text/javascript' src="bundle.js"></script>
iotaModule is some wrapper function for I wrote for using iota.js and it requires @iota/core, @iota/converter. do I need to include that here too? What does this error mean here?