ReferenceError : window is not defined at object. Node.js
window is a browser thing that doesn’t exist on Node. If you really want to create a global, use global instead: global is Node’s identifier for the global object, like window is on browsers. But, there’s no need to create truly global variables in Node programs. Instead, just create a module global: …and since you include it in your exports, other modules can … Read more