You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/node_modules/box-js/node_modules/vm2/lib/main.js:297
throw this._internal.Decontextify.value(e);
^
ReferenceError: navigator is not defined
at vm.js:111:17
at vm.js:143:6
at ContextifyScript.Script.runInContext (vm.js:59:29)
at VM.run (/usr/local/lib/node_modules/box-js/node_modules/vm2/lib/main.js:291:64)
at Object.<anonymous> (/usr/local/lib/node_modules/box-js/analyze.js:442:5)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
And I am wondering if this is just because navigator is not defined as a value or ?
The text was updated successfully, but these errors were encountered:
this is just because navigator is not defined as a value or ?
Indeed, the script expects navigator to be implemented, but box-js does not do so.
You're likely trying to run a script that was meant to run in a browser, whereas box-js targets WScript (which does not implement navigator either). With that in mind, you can try a simple patch in patch.js that exposes the properties your script might be interested in (eg. navigator = {appName: "Netscape", appVersion: "5.0 (Windows)"}), or something more complex with Proxy objects to see what the script is trying to read (there are many such objects in the codebase).
I won't be working on box-js for a good while, and especially not in the direction of targeting browser emulation, so I'm closing this issue.
I am getting this error:
And I am wondering if this is just because navigator is not defined as a value or ?
The text was updated successfully, but these errors were encountered: