I want to use node.js serialport so my unix running in a browser can access the serial port(uart). I'm sure serialport is a marvellous module but I can't get it. node.js is marvellous, but npm is disgraceful. I'm constrained to Windows8(sorry), npm fails in cygwin because of \r chars, npm fails after I configured Python, env variables with "weird error 1". That is not helpful.
But I don't want to npm anyway. I did download a mime.js and just require it directly. My list of requires below. I would like to do the same with serial port. This means I can deliver my entire source tar, and users only have to install vanilla node.js, and no messing around with npm/python
So how can I get the source code of serialport require it as my own module like mime, sprintv below.
http = require('http'),
url = require('url'),
path = require('path'),
fs = require('fs'),
proc = require('child_process'),
mime = require('./mime.js'), // mime is not intrinsic
stdio = require('./sprintv.js'), // sprintf type function via dummy stdio
You can not do that for
serialport
becauseserialport
has C/C++ source code.npm install
not only download the source but also download dependencies and compile them for each platform.Anyway, if you can compile C/C++ using
node-gyp
you can downloadserialport
here:goto https://github.com/voodootikigod/node-serialport
then click Download ZIP