I'd like to use processingJS as an npm package in a nodeJS server for deployment on MS Azure. I'm using VS15. I'm having trouble referencing it:
var pjs = require('processing-js');
var http = require('http'),
fs = require('fs');
var port = process.env.port || 1337;
The first line of my code throws
ReferenceError: navigator is not defined
The research I've done leads me to believe that navigator is some property related to the browser but I'm having trouble finding more information.
I have looked at these resources but wasn't able to come up with a solution:
Require('jquery-ui') in node-webkit produces navigator not found error
https://github.com/tobie/ua-parser/issues/440
http://fredkschott.com/post/2014/06/require-and-the-module-system/
I'd like to be able to precompile processing into javascript.
Thanks in advance.