我想在nodeJS服務器中使用processingJS作爲npm包以便在MS Azure上部署。我正在使用VS15。我無法引用它:require(processing-js)throws參考錯誤:未找到導航
var pjs = require('processing-js');
var http = require('http'),
fs = require('fs');
var port = process.env.port || 1337;
我的第一行代碼拋出
ReferenceError: navigator is not defined
我已經做了研究使我相信導航儀是某些屬性相關的瀏覽器,但我很難找到更多的信息。
我已經看過這些資源,但未能拿出一個解決方案:
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/
我希望能夠預編譯處理成javascript。
在此先感謝。