Question in AppJS -harmony?

I am using msvc and it installs the nodejs tools. Obviously new to node.js, but all the other npm packages I just installed via command line or via toolsjs and they worked. AppJS, however, is giving me an error when I call require ('appjs').

throw new Error ("AppJS requires Node to start with the --harmony line)

Does anyone know how to fix this? I am getting this error even when calling my script from the command line doing

node --harmony app.js

      

Actual code

var serialPortLib = require("serialport");
var appjs = require('appjs');

var serialPort = new serialPortLib.SerialPort("COM13",{
    baudrate : 250000,
    parser : serialPortLib.parsers.readline('\n')
});

serialPort.on('open', function () { console.log('open'); serialPort.write("Sup!\n");});
serialPort.on('data',function(data){ console.log(data);})

      

+3


source to share





All Articles