njh / node-owfs

A node.js client library for the owserver protocol in owfs
https://www.npmjs.com/package/owfs
MIT License
10 stars 4 forks source link

buffertools is not defined #3

Closed provegard closed 11 years ago

provegard commented 11 years ago

I get this error:

/home/per/projects/senserve/node_modules/owfs/owfs.js:53
        var bres = buffertools.concat(msg, path+'\x00');
                   ^
ReferenceError: buffertools is not defined
    at Socket.<anonymous> (/home/per/projects/senserve/node_modules/owfs/owfs.js:53:20)
    at Socket.g (events.js:192:14)
    at Socket.EventEmitter.emit (events.js:93:17)
    at Object.afterConnect [as oncomplete] (net.js:752:10)

I suppose it's because buffertools is required at the beginning of the file but not assigned to a variable...

marhul commented 11 years ago

I had the same problem and there is my solution: in file owfs.js in folder node_modules/owfs change row from require('buffertools'); to buffertools = require('buffertools');

ghost commented 11 years ago

Please take a look to my version: https://github.com/vkfont/owjs/blob/master/owjs.js#L93-L95

benediktarnold commented 11 years ago

Sorry guys for being inactive a while. This is fixed now.